KarolWozniak

Zadanie 7 tablice

Apr 16th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. int tab[10];
  8. int a=1,b=50;
  9.  
  10. int main()
  11. {
  12.     srand(time(NULL));
  13.     for(int i=0;i<10;i++)
  14.     {
  15.         tab[i] = a+rand()%(b-a+1);
  16.  
  17.     }
  18.     return 0;
  19. }
Add Comment
Please, Sign In to add comment