2018-12-27作业4

for (int i = 1; i <= 3; i++) { Console.WriteLine("qingshurumima"); string a = Console.ReadLine(); Console.WriteLine("qingshuruyhm"); string b= Console.ReadLine(); if (a != "1" ||b != "2") { if (i == 3) { Console.WriteLine("退出"); break; } Console.WriteLine("错误充数"); } if (a == "1" && b == "2") { Console.WriteLine("正确"); break; } } Console.ReadKey();

你可能感兴趣的:(2018-12-27作业4)