#include<stdio.h>
int main()
{
int ret = 1;
int sum = 0;
int n = 0;
for (n = 1; n <= 10; n++)//10可以变成任意值
{
ret = ret * n;
sum = sum + ret;
}
printf("%d", sum);
return 0;
}
标签:return,进阶,int,sum,ret,C语言,阶乘,main From: https://blog.51cto.com/u_16238277/7725791