解题思路:
边读边处理;代码如下:
注意事项:
参考代码:
#include <cstdio> #include <cstdlib> #include <iostream> #include <cmath> #include <cstring> #include <string> #include <algorithm> #include <functional> using namespace std; int main() { int a[4][5], maxn=-2100000000, x, y; for(int i = 1; i <= 3; ++i) { for(int j = 1; j <= 4; ++j) { scanf("%d", &a[i][j]); if(abs(a[i][j])> maxn) { maxn = abs(a[i][j]); x = i; y = j; } } } printf("%d %d %d\n", maxn, x, y); return 0; }
0.0分
1 人评分
C二级辅导-同因查找 (C语言代码)浏览:663 |
川哥的吩咐 (C语言代码)浏览:875 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:667 |
C语言程序设计教程(第三版)课后习题7.1 (C语言代码)浏览:734 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:643 |
多输入输出练习1 (C语言代码)浏览:1189 |
拆分位数 (C语言代码)浏览:1328 |
【出圈】 (C语言代码)浏览:796 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:686 |
文科生的悲哀 (C语言代码)浏览:1401 |