fork download
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. int main (){
  5. int n, m, arr[100][100];
  6. cin >> n >> m;
  7. for(int i = 0; i < n; i++){
  8. for(int j = 0; j < m; j++){
  9. cin >> arr[i][j];
  10. }
  11. }
  12. for(int i = 0; i < n; i++){
  13. for(int j = 0; j < m; j++){
  14. cout << arr[i][j] << " ";
  15. }
  16. cout << endl;
  17. }
  18. }
  19.  
Success #stdin #stdout 0.01s 5300KB
stdin
3 4
1 2 3 4
5 6 7 8 
9 10 11 12
stdout
1 2 3 4 
5 6 7 8 
9 10 11 12