Advertisement
MeehoweCK

Untitled

Nov 26th, 2022
670
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     // generowanie liczby pseudolosowej z przedziału od -15 do 15:
  10.     srand(time(nullptr));
  11.     cout << rand() % 31 - 15 << endl;     // wypisanie wartości losowej
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement