Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code a rock paper scissors program in C, not C++ The winner of each match is chosen by the following rubric:Rock wins against scissors Scissors

Code a rock paper scissors program in C, not C++

The winner of each match is chosen by the following rubric:Rock wins against scissors

Scissors wins against paper

Paper wins against rock

If both players select the same entity, the result is a tie.

program must follow these specifications

image text in transcribed

sample output this must be able to match:

image text in transcribed

The user must be prompted for a random seed which you'll use in the code. The user must be prompted for the number of games the user wants to play. The program should keep track of the score of both the computer and the human. The program should keep running until the number of games specified are completed. During each turn, the computer randomly selects its choice. Make sure the human enters a legal choice. After each turn, the program should display who won the previous round and the score after that turn. After all matches are played, a summary of the final score is displayed. Starting the CPSC 1011 Rock, Paper, Scissors Game! Enter a random seed between 0 - 100: 99 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 paper. You lose. Scores: Computer-1 Match 2: Enter R for rock, P for paper, or s for scissors: R The computer chose rock. You tied. Scores: Computer-1 Ties-1 Match 3: Enter R for rock, P for paper, or s for scissors: S The computer chose rock. You lose. Scores: Computer-2 Ties-1 The game of 3 matches is complete. The final scores are: You: Computer: 2 Ties: 1 ./a.out Starting the CPSC 1011 Rock, Paper, scissors Game! Enter a random seed between o 100:12 Enter the number of matches to play: 1 Match 1: Enter R for rock, P for paper, or s for scissors: z Not a legal move The game of 1 matches is complete. The final scores are: You: Computer: 0 Ties: 0 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions