#include <stdio.h> //计算1到5的阶乘和,并将结果保存到变量s中 main() { int a,s=【1】,b=【2】; for(a=1;a<=【3】;a++) { b=b*a; s【4】=【5】; } printf("1-5阶乘的和为:%d",s); getchar(); }
#include <stdio.h> //计算1到5的阶乘和,并将结果保存到变量s中 main() { int a,s=0,b=1; for(a=1;a<=5;a++) { b=b*a; s+=b; } printf("1-5阶乘的和为:%d",s); getchar(); }
标签:include,int,C语言,阶乘,填空,main From: https://www.cnblogs.com/xkdn/p/17107847.html