paperrockstone

paperrockstone - cout<<" player 2 beats player...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> using namespace std; void main() { int a, b; int a=1; int b=2; int c=3; cout << " PLEASE ENTER THE CHOICES RESPECTIVELY. PLEASE ENTER 1 FOR SCISSOR, 2 FOR PAPER and 3 FROM ROCK." << endl ; cin >> a ; cin >> b ; if ( a==b ) cout <<" You have entered a draw match. " << endl; cout <<" player 1 beats player 2. " << endl;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout <<" player 2 beats player 1. " << endl; else if ( a==1 && b==3 ) cout <<" player 2 beats player 1. " << endl; else if ( a==3 && b==1 ) cout <<" player 1 beats player 2. " << endl; else if ( a==2 && b==3 ) cout <<" player 1 beats player 2. " << endl; else if ( a==3 && b==2 ) cout <<" player 2 beats player 1. " << endl; }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online