标签:clu return ret code 循环 row for pre ++
1 #include<stdio.h> 2 int main() 3 { 4 int a[3][4] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 11, 12 }; //设置数组 5 int i, k,max,low,row; 6 max = 0; 7 low = 0; 8 row = 0; 9 for (i = 0; i <= 2;i++) //循环遍历数组 10 { 11 for (k = 0; k <= 3;k++) 12 { 13 if (a[i][k]>max) //如果比MAX大就赋值 14 { 15 low = i; 16 row = k; 17 max = a[i][k]; 18 } 19 } 20 } 21 printf("%d\t%d\t%d", max, low, row); 22 23 return 0; 24 }
标签:clu return ret code 循环 row for pre ++
原文地址:https://www.cnblogs.com/old-horse/p/12519671.html