paperrockstone

paperrockstone - cout...

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 &lt;&lt;&quot; player 2 beats player 1. &quot; &lt;&lt; endl; else if ( a==1 &amp;&amp; b==3 ) cout &lt;&lt;&quot; player 2 beats player 1. &quot; &lt;&lt; endl; else if ( a==3 &amp;&amp; b==1 ) cout &lt;&lt;&quot; player 1 beats player 2. &quot; &lt;&lt; endl; else if ( a==2 &amp;&amp; b==3 ) cout &lt;&lt;&quot; player 1 beats player 2. &quot; &lt;&lt; endl; else if ( a==3 &amp;&amp; b==2 ) cout &lt;&lt;&quot; player 2 beats player 1. &quot; &lt;&lt; endl; }...
View Full Document

Ask a homework question - tutors are online