首页 > 编程语言 >C#-大数_计算100!(阶乘,0*1*2*3*...*100)

C#-大数_计算100!(阶乘,0*1*2*3*...*100)

时间:2023-01-11 15:13:00浏览次数:46  
标签:... BigInteger 大数 C# 阶乘 100

计算100!:

Console.WriteLine("BigInteger");
BigInteger result4 = 0;
for (int i = 1; i <= 100; i++)
{
    if (result4 == 0)
    {
        result4 = 1;
    }
    else
    {
        result4 = result4 * i;
    }

}
Console.WriteLine(result4);

标签:...,BigInteger,大数,C#,阶乘,100
From: https://www.cnblogs.com/qq2806933146xiaobai/p/17043808.html

相关文章