Advertisement
DawidKubiak

Zadanie 4

Apr 19th, 2020
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int a=0;//orzeł
  9.     int b=1;//reszka
  10.     srand(time(NULL));
  11.    cout<<a+rand()%(b-a+1)<<endl;
  12. //Wyglada na to, że wyniki sa losowe po wielu probach uruchomienia programu.
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement