Question: I need help with C++ HW, need to use while loop and if statement. Welcome to the game of Rock/Paper/Scissors where you play against the

I need help with C++ HW, need to use while loop and if statement.

Welcome to the game of Rock/Paper/Scissors where you play against the computer in C++ program. On each move the computer will choose R, P, or S, then the user will be prompted for their choice, and then the score will be updated. P beats R, R beats S, and S beats P. The score starts at 0. Add one if the person wins, subtract one if the computer wins. The game ends if the score reaches -5 or + 5. User input of 'x' or 'X' causes the game to exit.

Option 1: (Computer always chooses R) and: User input of X immediately exits program User input of x (lower case) immediately exits program Program handles both lower and upper case user input (e.g. 'r' and 'R'); also move number increments each move Score updates correctly for all user inputs: r, p, s Option 2: Computer's move is random and: Predetermined input sequence correctly leads to computer win Predetermined input sequence correctly leads to human win Option 3: Correctly displays and updates the graphical score Correctly displays and updates the graphical score, with assessment results hidden

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!