摘要: 输入n个整数,存入数组a中,分别按正序和逆序输出这些数#includeint main(){ int i,m,max; int count[9]; for(i=0;i=0;i--) printf("数组元素a[%d],元素值%d\n",i,count[i]); //逆序输出 return 0; } 阅读全文
posted @ 2013-10-28 09:34 执于一念 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 输入n个整数,将它们存入数组a中。输出最大值和它所对应的下标。#includeint main(){ int i,n,m,max; int count[9]; n=10; for(i=0;imax) max=count[i]; } printf("the max number=%d and index=%d",max,i-1);//输出 return 0;} 阅读全文
posted @ 2013-10-28 09:17 执于一念 阅读(195) 评论(0) 推荐(0) 编辑