A program that implements a Rock/Paper/Scissors game that allows the user to play the
computer. The program should prompt the user to enter R, P,or S for Rock, Paper, or Scissors,
then it should randomly generate the computer’s choice and determine who won and display
the result. The program should allow the user to continue playing until the user decides to
stop, displaying the score (number of times that the computer won, the number of times that
the player won and the number of ties).
In this game, Rock beats (breaks) Scissors, Scissors beats (cuts) Paper, and Paper beats
(covers) Rock.
The program should do error handling on the input values and require the Player toenter
R, P, S or Q (for quit). The program should accept both upper and lower case letters. The
program output should look like the example output in the last section, including spacing and
error handling.
- The program must use at least three functions, excluding the flush Scanf function provided below, with appropriate parameters and return values in addition tomain. You may create and use as many functions as you wish.
- Make sure that your project is organized with function declarations, then the main function, then the other functions.
- You must not use global variables.
- The program must use at least one while or for loop.
- The program must use at least one switch statement.
- The program must use at least one if...else if...else multi-way statement.
- The program must randomly choose the computer’s choice or R, P, orS.
- Avoid the use of hard coded numbers. Use constants instead.