阶乘
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace jiecheng
{
class Program
{
static void Main(string[] args)
{
int i, n;
double sum = 1;
Console.WriteLine("请输入n的值:");
n = int.Parse(Console.ReadLine());
for (i = 1; i <= n; i++)
sum *= i;
Console.WriteLine("n!={0}", sum);
}
}
}