Kacper_Michalak

Zadanie losowanie 4

Feb 15th, 2021 (edited)
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int i;
  9.     int x;
  10.     srand(time(NULL));
  11.  
  12.     x = rand() % (1 + 1);
  13.     if (x == 0)
  14.     {
  15.         cout << "Orzel" << endl;
  16.     }
  17.     else
  18.         cout << "Reszka" << endl;
  19.  
  20.     /* Wyniki są losowe */
  21. }
Add Comment
Please, Sign In to add comment