用c语言的函数编写程序,求1的阶乘加3的阶乘加5的阶乘一直加到19阶乘

如题所述

//#include "stdafx.h"//If the vc++6.0, with this line.
#include "stdio.h"
int main(void){
    int i;
    __int64 sum,tmp;
    for(sum=tmp=1,i=3;i<20;i+=2)
        sum += (tmp*=i)*=(i-1);
    printf("The result is %I64d\n",sum);
    return 0;
}

温馨提示:答案为网友推荐,仅供参考