⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1.7.txt

📁 《Microsoft Visual C# .NET 2003开发技巧大全》源代码
💻 TXT
字号:
Listing 1.7 Using a for Statement to Loop and Calculate the Factorial of a Number
static void ComputeFactorial()
{
ulong loopCount = 0;
ulong factorial = 1;
Console.Write( “Enter an integer between 1 and 50: “ );
loopCount = UInt64.Parse( Console.ReadLine() );
for( ulong i = loopCount; i > 0; i-- )
{
factorial *= i;
}
Console.WriteLine( “{0}! = {1}”, loopCount, factorial );
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -