#include"stdio.h"
main()
{
long i ,sum;
printf("请输入一需要求阶乘的数:");
scanf("%ld",&i);
sum=1;
while(i>1)
{
sum=sum*i;
i--;
}
printf("\n 这个数的阶乘是=%ld",sum);
return 0;
}
标签:ld,sum,一需,C语言,printf,阶乘 From: https://www.cnblogs.com/hyborn/p/17228676.html