求阶乘的C语言代码:
# include<stdio.h>
int main()
{
int i, n=1,m, sum=0;
scanf("%d",& m);
for(i=1; i<= m; i++)
{ n= n*i;
}
sum= sum+n;
printf("%d", sum);
return 0;
}
求阶乘的C语言代码:
# include<stdio.h>
int main()
{
int i, n=1,m, sum=0;
scanf("%d",& m);
for(i=1; i<= m; i++)
{ n= n*i;
}
sum= sum+n;
printf("%d", sum);
return 0;
}