摘要: 7-2 求最大值及其下标 (20 分) 本题要求编写程序,找出给定的n个数中的最大值及其对应的最小下标(下标从0开始)。 # include<stdio.h> int main() { int i,n,m; scanf ("%d",&n); int a[n]; for(i=0;i<n;i++){ s 阅读全文
posted @ 2019-03-03 16:59 悉于 阅读(74) 评论(0) 推荐(0) 编辑
摘要: -1 查找整数 (10 分) 本题要求从输入的N个整数中查找给定的X。如果找到,输出X的位置(从0开始数);如果没有找到,输出“Not Found”。 # include<stdio.h> int main (void) { int i,N,x,count=0; scanf ("%d %d",&N, 阅读全文
posted @ 2019-03-03 15:57 悉于 阅读(93) 评论(0) 推荐(0) 编辑