Question: Please create lab with source code. Follow everything on assignment below except submission part. Lab 3 - Rock, Paper, Scissors Objectives: To use If-Statements to
Lab 3 - Rock, Paper, Scissors Objectives: To use If-Statements to affect the logical flow of your program To use Switch Statements To design a game and have fun 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? Then have the computer generate its choice randomly (0, , or 2). Remember to seed your random generator at the top of the main method. Now that you have the numeric choice, you will need to convert (using a Switch statement) it into a letter (R", "S', orP'.) Then determine the winner of the game. Remember that Rock crushes Scissors, Paper covers Rock, and Scissors cuts Paper. Have fun with this one. If you are up for an extra challenge, consider how you would introduce lizard and Spock into the game for rock, paper, scissors, lizard, Spock. Run: Make sure that you gain at least one win, one loss, and one tie. Do as many attempts as necessary to gain all three of these outcomes. Submission: Turn in the source program and your output. Please show all of the attempts, even if they are duplicates. (Include all of your wins, all of your losses, and all of your ties in the output) Please turn both the cpp file and the output text into drop box. See Lab 1's instruction sheet for details on how to document, save, and turn in your work. 1 CSE 1311 Pierce
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
