摘要:
输入n个整数,将它们存入数组a中。输出最大值和它所对应的下标。#includeint main(void){ int col,i,j,row; int a[5][1]; /*将输入的数存入二维组数*/ printf("Enter 5 integers:\n"); for(i=0;ia[row][col]){ row=i; col=j; } printf("max=a[%d][%d]=%d\n",row,col,a[row][col... 阅读全文
摘要:
#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< 阅读全文