#include <stdio.h>
int main()
{
int i,n;
int sum = 1;
scanf_s("%d", &n);
for (i = 1; i<=n; i++)
{
sum = sum * i;
}
printf("sum=%d\n", sum);
return 0;
}
标签:return,int,sum,计算,printf,阶乘,main From: https://blog.51cto.com/u_16336886/8195403
#include <stdio.h>
int main()
{
int i,n;
int sum = 1;
scanf_s("%d", &n);
for (i = 1; i<=n; i++)
{
sum = sum * i;
}
printf("sum=%d\n", sum);
return 0;
}
标签:return,int,sum,计算,printf,阶乘,main From: https://blog.51cto.com/u_16336886/8195403