#include"stdio.h"
void main()
{
long int total=1;
int n=1;
while(n<=10)
{
total*=n;
n++ ;
}
printf(“the result is %ld\n”,total);
}
第九十六题:计算10的阶乘(10!)
最新推荐文章于 2022-01-16 16:47:50 发布
#include"stdio.h"
void main()
{
long int total=1;
int n=1;
while(n<=10)
{
total*=n;
n++ ;
}
printf(“the result is %ld\n”,total);
}