返回列表 發帖
  1. #include <iostream> //引入函數庫
  2. #include <cstdlib>

  3. using namespace std;
  4. int main(void){

  5.     int b , c;
  6.     int a[100][100] = {0};
  7.     while(cin >> b >> c){
  8.     for(int i = 0; i < b; i++){
  9.     for(int j = 0; j < c; j++){
  10.     cin >> a[i][j];
  11.     }
  12.    
  13. }
  14.    
  15.     for(int j=0;j<c;j++){
  16.              for(int i=0;i<b;i++)
  17.              {
  18.                     cout << a[i][j];
  19.                     cout << " ";      
  20.              }
  21.              cout << '\n';     
  22.     }

  23.     }
  24.    
  25.    




  26.     //system("pause");
  27.     return 0;
  28. }
複製代碼
離離草原上
一歲一枯榮
野火燒不盡
春風吹又生

TOP

返回列表