#include <stdio.h>
int main()
{
int i = 1;
int fact = 1;
int sum = 0;
while(i <= 10){
fact = fact*i;
i++;
sum = sum+fact;
}
printf("%d\n",sum);
return 0;
}
【c语言】计算1!+2!+...+10!
于 2024-07-18 20:38:31 首次发布