- #include <iostream> //引入函數庫
- #include <cstdlib>
- using namespace std;
- int main(void){
- int b , c;
- int a[100][100] = {0};
- while(cin >> b >> c){
- for(int i = 0; i < b; i++){
- for(int j = 0; j < c; j++){
- cin >> a[i][j];
- }
-
- }
-
- for(int j=0;j<c;j++){
- for(int i=0;i<b;i++)
- {
- cout << a[i][j];
- cout << " ";
- }
- cout << '\n';
- }
- }
-
-
- //system("pause");
- return 0;
- }
複製代碼 |