C++11: Rock Paper Scissor Simple Console Implementation

Rock–Paper–Scissors (also known as paper, scissors, stone or other variants) is a hand game usually played between two people, in which each player simultaneously forms one of three shapes with an outstretched hand. These shapes are "rock" (a closed fist), "paper" (a flat hand), and "scissors" (a fist with the index and middle fingers extended, forming a V). "Scissors" is identical to the two-fingered V sign (aka "victory" or "peace sign") except that it is pointed horizontally instead of being held upright in the air. A simultaneous, zero-sum game, it has only two possible outcomes: a draw, or a win for one player and a loss for the other. 



Rock–paper–scissors is often used as a fair choosing method between two people, similar to coin flipping, drawing straws, or throwing dice in order to settle a dispute or make an unbiased group decision. Unlike truly random selection methods, however, rock–paper–scissors can be played with a degree of skill by recognizing and exploiting non-random behavior in opponents.[Wikipedia]

 

Here is the C++ implementation 




                                                                  
                                                                  
Reference:
 


You may also like 
C++: Find Prime Factors of a Number
C++: Collatz Conjecture Program  
C++: Tic Tac Toe  
C++: Bellman Ford Algorithm using STL  
C++: Remove all adjacent duplicates from String using Stack  

Comments