Advertisement
MeehoweCK

Untitled

Nov 16th, 2020
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     srand(time(nullptr));                // srand(unsigned) ustala początek losowania
  10.  
  11.     // wylosowanie 10 liczb z przedziału od 1 do 32767
  12.     for(int i = 0; i < 10; ++i)
  13.         cout << rand() << endl;
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement