1. Engineering
  2. Computer Science
  3. c program the first stage sets the computer guess to...

Question: c program the first stage sets the computer guess to...

Question details

The first stage sets the computer guess to always be R for Rock each move. Running the program with the first stage should look like the following Welcome to the game of Rock/Paper/Scissors where you play against the computer. 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 e. Add one if the person wins, subtract one if the computer wins. The game ends if the score reaches -5 or5 User input of x or x causes the game to exit. Here we go! Select how the computer chooses its move: 1. Always choose Rock 2. Random guess 3. Random guess with graphical score Enter your choice: 1 1. Your move: r Computer chose R Tie. Score: e 2. Your move:R Tie. Score: e 3. Your move: p Computer chose R Computer chose R Users point. Score: 1 4. Your move:S Computer chose R Computers point. Score: 0 5. Your move: x Exiting program... Tie game! Ending program...

C++ program. The first stage sets the computer guess to always be 'R' for Rock each move. Running the program with the first stage should look EXACTLY like the following. This program is different than others I have seen online. This program has the computer ALWAYS choosing R. For number 3 checkpoint the score gives the user the point and for number 4 checkpoint it gives the computer a point (thus removing the point from the user). When user inputs character 'x' it ends the program.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution