#include <stdio.h> double fact(int n); int main(void) { int n; double sum; sum=0; for(n=1;n<=100;n++) sum=sum+fact(n); printf("1!+2!+3!+…+100!=%e\n",sum); return 0; } double fact(int n) { int i; double result; result=1; for(i=1;i<=n;i++) result=result*i; return result; }