fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int arrayheight, arraywidth, col, row, T[arrayheight][arraywidth];
  8.  
  9. cin >> arrayheight;
  10. cin >> arraywidth;
  11.  
  12. for (col = 0; col < arraywidth; col++) {
  13. for (row = 0; row < arrayheight; row++) {
  14. cin >> T[col][row];
  15. }
  16. }
  17.  
  18. for (col = 0; col < arraywidth; col++) {
  19. cout << endl;
  20. for (row = 0; row < arrayheight; row++) {
  21. cout << T[col][row] << " | ";
  22. }
  23. }
  24. // ---------------------------------------------------------
  25.  
  26. return 0;
  27. }
  28.  
Runtime error #stdin #stdout 0s 4184KB
stdin
Standard input is empty
stdout
Standard output is empty