Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C programming(not ++) Create a rock paper scissors game where a user plays the computer. The computer should always choose randomly. Please add comments by
C programming(not ++)
Create a rock paper scissors game where a user plays the computer. The computer should always choose randomly. Please add comments by your code. The output should run exact like this:
./a.out Starting the CPSC 1011 Rock, Paper, Scissors Game! Enter the number of matches to play: 3 Match 1: Enter R for rock, P for paper, or s for scissors: R The computer chose scissors. You win! Scores: You-1 Match 2: Enter R for rock, P for paper, or s for scissors: R The computer chose paper. You lose. Scores: You-1 Computer-1 Match 3: Enter R for rock, P for paper, or s for scissors: S The computer chose scissors. You tied. Scores: You-1 Computer-1 Ties-1 You: The game of 3 matches is complete. The final scores are: 1 Computer: 1 Ties: 1 Make sure the computer selects its choice randomly and doesn't factor in the input from the user in making its decision. While technically this could be done, cheating isn't allowed in Rock Paper ScissorsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started