MeehoweCK

Untitled

Aug 5th, 2021
644
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. const short W = 7, K = 5;
  8.  
  9. int main()
  10. {
  11.     srand(time(nullptr));
  12.     // deklaracja tablicy dwuwymiarowej
  13.     short tablica[W][K];
  14.     for(short i = 0; i < W; ++i)
  15.     {
  16.         for(short j = 0; j < K; ++j)
  17.         {
  18.             tablica[i][j] = rand() % 11;
  19.             cout << tablica[i][j] << '\t';
  20.         }
  21.         cout << endl;
  22.     }
  23.     return 0;
  24. }
RAW Paste Data