小编teh*_*mer的帖子

错误CS1014:期望获取或设置访问者

using System;

//Find the square root of a number for 10 values from user

class forLoop
{
    static void Main
    {

        double x;

        for(int i=10; i>0 && x>=0; i--)
        {


        Console.WriteLine("You have {0} remaining calculations left", i);
        Console.Write("Please enter a positive number: ");

        x = double.Parse((Console.ReadLine());
        x = Math.Sqrt(x);

        Console.WriteLine("The square root is {0}", x);
        Console.WriteLine("");
        }

    Console.WriteLine("You have 0 remaining calculations left");

    }

}
Run Code Online (Sandbox Code Playgroud)

我需要有关此C#问题的帮助:为什么错误:"get get或set accessor expected"会在编译时出现?

c#

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

c# ×1