80分求助
查看原帖
80分求助
946929
xuzihao123楼主2023/6/17 12:27
#include <iostream>
using namespace std;
int main(){
    int h,a;
    cin>>a>>h;
    int l[100][100];
    for(int i=1;i<=a;i++){
        for(int j=1;j<=h;j++){
            cin>>l[i][j];
        }
    }
    for(int i=1;i<=h;i++){
        for(int j=1;j<=a;j++){
            cout<<l[j][i]<<" ";
        }
        cout<<endl;
    }
}
2023/6/17 12:27
加载中...