#include<stdio.h>
int main()
{int a,b,c;
a=1;
b=2;
scanf("%d",&c);
do
{
a*=b;
b++;
}while(b<=c);
printf("%d",a);
return 0;
}
C语言求阶乘任意数
最新推荐文章于 2022-11-24 15:02:30 发布
#include<stdio.h>
int main()
{int a,b,c;
a=1;
b=2;
scanf("%d",&c);
do
{
a*=b;
b++;
}while(b<=c);
printf("%d",a);
return 0;
}