Jump to content

Rock-paper-scissors: Difference between revisions

No edit summary
Line 653:
cout << "| | WON | DRAW | ROCK | PAPER | SCISSORS |" << endl;
cout << "+--------------+----------+----------+----------+----------+----------+" << endl;
cout << "| PLAYER | " << pw << " | " << d << " | " << pr;
cout << " | " << pp << " | " << ps << " |" << endl;
cout << "+--------------+----------+---------- " << d << " +----------+----------+----------+" << endl;
cout << "| COMPUTER | " << cw << " | " << d << " | " << cr;
cout << " | " << cp << " | " << cs << " |" << endl;
cout << "+--------------+----------+----------+----------+----------+----------+" << endl;
Line 789:
//-------------------------------------------------------------------------------
</lang>
<pre>
Output:
+--------------+----------+----------+----------+----------+----------+
| | WON | DRAW | ROCK | PAPER | SCISSORS |
+--------------+----------+----------+----------+----------+----------+
| PLAYER | 0003 | | 0006 | 0004 | 0002 |
+--------------+----------+ 0001 +----------+----------+----------+
| COMPUTER | 0008 | | 0001 | 0003 | 0008 |
+--------------+----------+----------+----------+----------+----------+
 
</pre>
 
=={{header|D}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.