f=1!+2!+3!+4!+......+n!
#include<stdio.h>void main()
{
double p=1,sum=0;
int i,n;
printf("Please input number:\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
p=p*i;
sum+=p;
}
printf("%f",sum);
getch();
}
bang mang jiancha xia nali cuo le lao shi yunxing bu liao