//计算 一到十 阶乘的和 #include <stdio.h> void main() { int i=1; int j=1; int sum=1; double sum1=0; while(i<=10) { while(j<=i) { sum=sum*j; j++; } printf(" %d! is %d\n",i,sum); sum1+=sum; i++; } printf("the last result is %lf\n",sum1); }