Console.WriteLine问题
static void Main(string[] args){
bool numbersOK = false;
double var1, var2;
var1 = 0;
var2 = 0;
while (!numbersOK)
{
Console.WriteLine("Give me a number:");
var1 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Give me another number:");
var2 = Convert.ToDouble(Console.ReadLine());
if ((var1 > 10) ^ (var2 > 10))
{
numbersOK = true;
}
else
{
if ((var1 <= 10) && (var2 <= 10))
{
numbersOK = true;
}
else
{
Console.WriteLine("Only one number may be greater than
10.");
}
}
}
Console.WriteLine("You entered {0} and {1}.", var1, var2);
Console.ReadKey();
}
上面的程序中
(!numbersOK)的!是什么意思啊?
还有下面红色的那句为什么显示错误啊 程序运行不成功。谢谢