Professional Documents
Culture Documents
Laboratory Exercise # 1 (Rock Paper Scissor) Date Name Log in Username Project Name / File Name: LE1 - Surname - CPP Upload Source Code Only
Laboratory Exercise # 1 (Rock Paper Scissor) Date Name Log in Username Project Name / File Name: LE1 - Surname - CPP Upload Source Code Only
Exercise #
Log in
Name
username
Rock Paper Scissor (RSP) is a very simple game which is played by two users. The rules are
as follows:
If input of Player 1 = R and input of Player 2 = S then Player 1 wins
If input of Player 1 = S and input of Player 2 = P then Player 1 wins
If input of Player 1 = P and input of Player 2 = R then Player 1 wins
If input of Player 2 = R and input of Player 1 = S then Player 2 wins
If input of Player 2 = S and input of Player 1 = P then Player 2 wins
If input of Player 2 = P and input of Player 1 = R then Player 2 wins
If both inputs of Player 1 and Player 2 are the same such as R, S, or P then it’s a tie.
Create a C++ Console Application that implements this game. Player 1 will be played by the
user and player 2 will be the computer which will generate a random data value. Display the
appropriate message if the input is invalid and use function in the implementation.
Date