Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
106239 | 欧阳俊懿 | 矩阵转置 | C++ | Compile Error | 0 MS | 0 KB | 539 | 2025-01-15 17:34:21 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main() int n,m; cin>>n>>m; int a[100][100]; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i][j]; } } for(int j=1;j<=m;j++){ for(int i=1;i<=n;i++){ cout<<a[i][j]<<" "; } } cout<<endl; return 0; }
Main.cc:8:5: error: expected initializer before 'int' int n,m; ^ Main.cc:9:5: error: 'cin' does not name a type cin>>n>>m; ^ Main.cc:11:5: error: expected unqualified-id before 'for' for(int i=1;i<=n;i++){ ^ Main.cc:11:17: error: 'i' does not name a type for(int i=1;i<=n;i++){ ^ Main.cc:11:22: error: 'i' does not name a type for(int i=1;i<=n;i++){ ^ Main.cc:16:5: error: expected unqualified-id before 'for' for(int j=1;j<=m;j++){ ^ Main.cc:16:17: error: 'j' does not name a type for(int j=1;j<=m;j++){ ^ Main.cc:16:22: error: 'j' does not name a type for(int j=1;j<=m;j++){ ^ Main.cc:21:5: error: 'cout' does not name a type cout<