#24909: C++


mdwiwi0130@gmail.com (nai_ye_130(李信緯))

School : 黎明中學
ID : 137034
IP address : [118.232.64.225]
Last Login :
2021-07-20 20:26:54
a015. 矩陣的翻轉 | From: [118.232.64.225] | Post Date : 2021-04-04 18:08

C++解

 

#include <iostream>

using namespace std;

int main(){

int x[100][100]={};

int a,b,i,y;

while(cin>>a>>b){

for(i=0;i<a;i++){

for(y=0;y<b;y++){

cin>>x[y][i];

}

}

for(int y=0;y<b;y++){

for(int i=0;i<a;i++){

cout<<x[y][i]<<" ";

}

cout<<"\n";

}

}

return 0;

 

 
ZeroJudge Forum