Advertisement
KarolWozniak

Losowanie Zadanie 1

Mar 31st, 2020
162
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.  
  5. using namespace std;
  6.  
  7. int a=9;
  8.  
  9. int main()
  10. {
  11.     srand(time(NULL));
  12.  
  13.     for(int i=1;i<=3;i++){
  14.         cout << rand()%(a+1) << " ";
  15.     }
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement