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()
- {
- int a = 1;
- int b = 2;
- srand( time( NULL ) );
- cout<<"Rzut moneta"<<endl;
- cout<<a+rand()%(b-a+1)<<endl;
- if(a+rand()%(b-a+1)==1)
- {
- cout<<"wypadla reszka";
- }
- else{
- cout<<"wypadl orzel";
- }
- //*Program wyœwietla wartosci wygladajace losowo ale takie nie sa
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement