Advertisement
MeehoweCK

Untitled

Jul 16th, 2019
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     // program losuje 100 liczb naturalnych z przedziaΕ‚u od 1 do 100
  10.     srand(static_cast<unsigned>(time(nullptr)));
  11.     for(int i = 0; i < 100; ++i)
  12.     {
  13.         cout << 1 + rand() % 100 << '\t';
  14.     }
  15.     cout << endl;
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement