void main()
{
int n,i=2;
long int fac=1;
printf("请输入一个正整数:");
scanf("%d",&n);
do
fac*=i++; /*做累乘运算*/
while(i<=n); /*循环结束的条件是i=n+1*/
printf("%d!=%ld\n",n,fac);
}
{
int n,i=2;
long int fac=1;
printf("请输入一个正整数:");
scanf("%d",&n);
do
fac*=i++; /*做累乘运算*/
while(i<=n); /*循环结束的条件是i=n+1*/
printf("%d!=%ld\n",n,fac);
}