大家好,我是编程新手,只是学习了一些基础知识,所以如果有人可以帮助我解决这个问题,我将陷入无限循环之中
Console.WriteLine("Welcome to the game guess the word");
Console.WriteLine("First word will be:");
Console.Write("City located in Europe in EX Yugoslavia is:");
string userWordInput = Console.ReadLine();
int i = 0;
do
{
for ( i = 0; i < 5; i++)
{
Console.WriteLine("Your input is wrong");
}
} while (userWordInput!="Sarajevo");
Console.ReadLine();
答案 0 :(得分:0)
Console.WriteLine("Welcome to the game guess the word");
Console.WriteLine("First word will be:");
Console.Write("City located in Europe in EX Yugoslavia is:");
string userWordInput = Console.ReadLine();
int i = 0;
do
{
for (i = 0; i < 5; i++)
{
Console.WriteLine("Your input is wrong");
}
} while (Console.ReadLine() != "Sarajevo");