新人请教,多谢
本人是新手,请高手帮帮忙,给解释一下while部分(包括条件),看不太明白了,谢谢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.");
}
}
}