int i;

int pro=1;
int hap=0;


for(i=1; i<=10; i++)
{
 pro=pro*i;
 hap=hap+pro;
}
printf("%d", hap);

이렇게 하니까 나오네