求(1!+2!+3!+…………20!)
求(1!+2!+3!+…………20!)点算啊?我毫无头绪吖``帮帮啊5该!
#include<stdio.h>
int main()
{
int i;
long result=0,n=1;
for(i=1;i<=20;i++)
{
n=i*n;
result+=n;
}
printf("the result is %ld\n",result);
return 0;
}