#include
// 求1!+2!+...+n!的值?
int main(void) {
int i,j,n,p,sum;
sum = 0;
scanf("%d",&n);
for(i=1,p=1;i { p
= p * i;
sum = sum + p;
printf("%d!+",i);
}
printf("%d!=%d",i,sum+p*i);
return 0;
}
//
int main(void) {
int i,j,n,p,sum;
sum = 0;
scanf("%d",&n);
for(i=1,p=1;i
sum = sum + p;
printf("%d!+",i);
}
printf("%d!=%d",i,sum+p*i);
return 0;
}
0 意見:
張貼留言