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()
- { srand(time(NULL));
- int a=1;
- int b=2;
- int moneta=a+rand()%(b-a+1);
- if (moneta==1){
- cout<<"Wynik to orzel"<<endl;
- }
- else {
- cout<<"Wynik to reszka"<<endl;
- }
- return 0;//uzyskane wyniki będą losowe
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement