for (int i= 0;; i++)
{
Console.WriteLine("请输入一个数字:");
string s = Console.ReadLine();
if (s != "q")
{
int no = Convert.ToInt32(s);
Console.WriteLine(2 * no);
}
else { break; }
}
return;
}
for (int i= 0;; i++)
{
Console.WriteLine("请输入一个数字:");
string s = Console.ReadLine();
if (s != "q")
{
int no = Convert.ToInt32(s);
Console.WriteLine(2 * no);
}
else { break; }
}
return;
}
转载于:https://www.cnblogs.com/jessica9920/archive/2012/10/09/2714830.html