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");
}
}
我需要此C#问题的帮助:为什么错误:“获取或设置访问器预期”出现在编译时?错误CS1014:一个获取或设置访问器预计
其中是该方法的特性的方法与C#导入的表达体的例子? – user3289032 2016-10-26 23:32:14