Advertisement
PiotrJurek

Zad4

Apr 17th, 2020
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int moneta;
  10. srand(time(NULL));
  11. moneta = rand()%2;
  12. if(moneta==0)
  13. {
  14. cout << "Reszka" << endl;
  15. }
  16. else if(moneta==1)
  17. {
  18. cout << "Orzel" << endl;
  19. }
  20. return 0;
  21. }
  22. //Liczby wydaja sie losowe.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement