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