GarikK

заброс данных в массив отдельно x , y

Mar 11th, 2020
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. // 11.03.2020.cpp:
  2. //
  3.  
  4. #include <iostream>
  5. using namespace std;
  6. int main()
  7. {
  8.     //creating array
  9.     int mas[5][4];
  10.     cout << "please enter number " << endl;
  11.     for (int y = 0; y < 4; y++)
  12.     {
  13.         cin >> mas[0][y];
  14.     }
  15.     cout << endl;
  16.  
  17.     for (int y = 0; y < 4; y++)
  18.     {
  19.         for (int x = 1; x < 5; x++)
  20.         {
  21.             mas[x][y] = 0;
  22.         }
  23.         cout << endl;
  24.     }
  25.  
  26.     for (int y = 0; y < 4; y++)
  27.     {
  28.         for (int x = 0; x < 5; x++)
  29.         {
  30.             cout << mas[x][y] << "\t";
  31.         }
  32.         cout << endl;
  33.     }
  34. }
Add Comment
Please, Sign In to add comment