Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- int main()
- {
- // program losuje 100 liczb naturalnych z przedziału od 1 do 100
- srand(static_cast<unsigned>(time(nullptr)));
- for(int i = 0; i < 100; ++i)
- {
- cout << 1 + rand() % 100 << '\t';
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement