摘要:
#includeint main(){ int m,n,count; int isprime(int m); printf("enter m and n(mm/2&&m!=1) result=m; return result;} 阅读全文
摘要:
#includeint main(){ int m,n; float result,sum; float fact(int n); printf("enter m and n:"); scanf("%d%d",&m,&n); sum=fact(m-n); result=fact(m)/(fact(n)*sum); printf("result=%.0f\n",result); return 0;}float fact(int n){ int i; float result; result=1; for(i=1;i< 阅读全文
摘要:
#includeint main(){ int i,n,sum; int fact(int n); sum=0; n=100; for(i=1;i<=n;i++){ sum=sum+fact(i); } printf("1!+2!+...+100!=%d\n",sum); return 0;}int fact(int n){ int i; double result; result=1; for(i=1;i<=n;i++){ result=result*i; } return res... 阅读全文