Advertisement
Dani_info

Untitled

Feb 26th, 2018
145
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. using namespace std;
  5.  
  6. int main()
  7. {  
  8.     srand(time(0));
  9.     int v[100][100], a, b;
  10.     cin >> a >> b;
  11.     for (int i = 0; i < a; i++)
  12.     {
  13.         for (int j = 0; j < b; j++)
  14.         {
  15.             v[i][j] = (1 + (rand() % 10));
  16.         }
  17.     }
  18.     for (int i = 0; i < a; i++)
  19.     {
  20.         for (int j = 0; j < b; j++)
  21.             cout << v[i][j] << " ";
  22.         cout << endl;
  23.     }
  24.     cout << endl;
  25.     system("pause");
  26.     return 0;
  27. }
Advertisement
RAW Paste Data Copied
Advertisement