int sum = 1;
Console.Write("请输入数字:");
int shu = int.Parse(Console.ReadLine());
for (int i = 1; i <= shu; i++)
{
sum = sum * i;
}
Console.WriteLine("结果为:" + sum);
转载于:https://www.cnblogs.com/duan594939295/p/4939763.html
int sum = 1;
Console.Write("请输入数字:");
int shu = int.Parse(Console.ReadLine());
for (int i = 1; i <= shu; i++)
{
sum = sum * i;
}
Console.WriteLine("结果为:" + sum);
转载于:https://www.cnblogs.com/duan594939295/p/4939763.html