Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
110431 | 洪鑫阳 | 二维数组的存储 | C++ | Compile Error | 0 MS | 0 KB | 416 | 2025-02-20 16:57:38 |
#include<iostream> using namespace std; int main() { int a[3][4]; for(int i=0;i<3;i++) { for(int j=0;j<4;j++) { cin>>n[i][j]; } } for(int i=0;i<3;i++) { for(int j=0;j<4;j++) { if(n[i][j]/100>=1) { cout<<" "<<n[i][j]; } if(n[i][j]/10>=1) { cout<<" "<<n[i][j]; } else { cout<<" "<<n[i][j]; } } cout<<endl; } return 0; }
Main.cc: In function 'int main()': Main.cc:10:9: error: 'n' was not declared in this scope cin>>n[i][j]; ^ Main.cc:17:7: error: 'n' was not declared in this scope if(n[i][j]/100>=1) ^ Main.cc:21:7: error: 'n' was not declared in this scope if(n[i][j]/10>=1) ^ Main.cc:5:6: warning: unused variable 'a' [-Wunused-variable] int a[3][4]; ^