RafalSobala

zad1/rand

Apr 6th, 2020
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. int a=9;
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     while(1==1){
  10.     srand(time(NULL));
  11.     cout << "Losowość: " << endl;
  12.  
  13.     cout<< rand()%(a+1)<<endl;
  14.     cout<< rand()%(a+1)<<endl;
  15.     cout<< rand()%(a+1)<<endl;
  16.     }
  17.  
  18.     return 0;
  19. }
Add Comment
Please, Sign In to add comment