Skip to content

Instantly share code, notes, and snippets.

@cthbst
Last active May 14, 2016 09:02
Show Gist options
  • Save cthbst/3d8ca87c2fb5e1ccdb55375f94a25604 to your computer and use it in GitHub Desktop.
Save cthbst/3d8ca87c2fb5e1ccdb55375f94a25604 to your computer and use it in GitHub Desktop.
#include<iostream>
using namespace std ;
int main(){
const int maxn = 100 ;
int n ,m ;
int A[maxn][maxn] ;
while (cin >> n >> m ){
for (int i=0 ;i<n ;i++ ){
for (int j=0 ;j<m ;j++ ){
cin >> A[i][j] ;
}
}
for (int j=0 ;j<m ;j++ ){
for (int i=0 ;i<n ;i++ ){
cout << A[i][j] <<" " ;
}
cout << endl ;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment