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()
- {
- // generowanie liczby pseudolosowej z przedziału od -15 do 15:
- srand(time(nullptr));
- cout << rand() % 31 - 15 << endl; // wypisanie wartości losowej
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement