摘要:
#includedouble fact(int j);int main(void){ int m,n; double s; s=0; printf("enter m:"); scanf("%d",&m); printf("enter n:"); scanf("%d",&n); s=fact(m)/(fact(n)*fact(m-n)); printf("%.f\n",s); return 0;}double fact(int j){ int i; double result; r 阅读全文
摘要:
#includedouble fact(int n);int main(void){ int i; double sum; sum=0; for(i=1;i<=100;i++)/*进入循环*/ sum=sum+fact(i);/*求和*/ printf("1!+2!+……+100!=%e\n",sum); return 0;}double fact(int n){ int i; double result; result=1; for(i=1;i<=n;i++)/*进入循环*/ result=result*... 阅读全文