Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime> // biblioteka przechowująca funkcje związane z czasem
- #include <cstdlib> // biblioteka przechowująca funkcję rand()
- using namespace std;
- int main()
- {
- srand(time(nullptr)); // funkcja ustawiająca "początek losowania"
- for(int i = 0; i < 10; ++i)
- cout << rand() << endl; // rand() zwraca losową liczbę całkowitą z przedziału od 1 do 32767
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement