Question: Write this in C++ You need to write a program to play Rock, Paper , Scissors. Start by h ave the p layer input his/her

Write this in C++
You need to write a program to play Rock, Paper, Scissors. Start by have the player input his/her choice R, S, or P. Hint, what data type should you use here? Answer char. Then have the computer generate its choice randomly as an integer (0-2 or 1-3). Remember to seed your random generator at the top of the main method, using srand(time(0)); which requires you to include and . This will make sure the game is truly random the user has no control on the output of the random number generator. Now that you have the numeric choice for the computer, you will need to convert (using a switchstatement) it into a letter (R, S, or P.) Then determine the winner of the game. Remember that Rock crushes Scissors, Paper covers Rock, and Scissors cuts Paper. You must print these explanations not just that the user won or the computer won.

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!