RafalSobala

tablice zad 7

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