📄 1.9.txt
字号:
Listing 1.9 The while Statement
using System;
namespace _14_Looping
{
class Game
{
[STAThread]
static void Main(string[] args)
{
WaitForNewMinute();
NumberGuessGame();
}
static void WaitForNewMinute()
{
int sec = -1;
Console.Write( “The game will start in “ );
while( DateTime.Now.Second != 0 )
{
if( sec != DateTime.Now.Second )
{
sec = DateTime.Now.Second;
Console.Write( “...{0}”, 60-DateTime.Now.Second );
}
}
Console.WriteLine();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -