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

posted on 2013-10-05 19:10  haha1235  阅读(190)  评论(0编辑  收藏  举报