Advertisement
PANZZZ

Untitled

Apr 8th, 2020
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cstdlib>
  4. #include <ctime>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.     int T[4][7];
  11.     srand(time(NULL));
  12.    
  13.     for(int y=0;y<7;y++)
  14.     {
  15.         for (int x=0; x<4;x++)
  16.         {
  17.             T[y][x]=((rand()%40)+0)-20;
  18.         }
  19.     }
  20.     for (int y=0;y<7;y++)
  21.     {
  22.         for(int x=0;x<4; x++)
  23.         {
  24.             cout<<T[y][x]<<setw(5);
  25.        
  26.         }
  27.         cout<<endl;
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement