| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 151052 | 张锦程 | 二维数组最大值 | C++ | Compile Error | 0 MS | 0 KB | 340 | 2026-04-04 14:44:29 |
#include<iostream> using namespace std; int main(){ int n[3][4]={}; for(i=0;i<3;i++){ for(j=0;j<4;j++){ cin>>n[i][j]; } }int max=n[0][0]; for(i=0;i<3;i++){ for(j=0;j<4;j++){ if(n[i][j]>max) max=n[i][j]; } }cout<<max; return 0; }
Main.cc: In function 'int main()':
Main.cc:5:9: error: 'i' was not declared in this scope
for(i=0;i<3;i++){
^
Main.cc:6:13: error: 'j' was not declared in this scope
for(j=0;j<4;j++){
^
Main.cc:10:9: error: 'i' was not declared in this scope
for(i=0;i<3;i++){
^
Main.cc:11:13: error: 'j' was not declared in this scope
for(j=0;j<4;j++){
^