Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Program has to be written in C# CIS162AD: Chapter4 Assignment RockPaperScissors Programming Exercise 8 (pg. 186) Scissors beats paper In the game Rock Paper Scissors,
Program has to be written in C#
CIS162AD: Chapter4 Assignment RockPaperScissors Programming Exercise 8 (pg. 186) Scissors beats paper In the game Rock Paper Scissors, two players simultaneously choose one of the three options rock, paper, or scissors. If both players choose the same option, then the result is a tie. However, if they choose differently, the winner is determined as follows Rock beats scissors, because rock can break a pair of scissors Scissors beats paper, because scissors can cut paper Paper beats rock, because a piece of paper can cover a rock. Create a game in which the computer randomly chooses rock, paper or scissors. Let the user enter a character r p, or s, each representing one of the three choices. Then, determine the winner. Save the application as RockPaperScissors.cs. Hint: Create a random number to generate numbers between 0 and 3, where 0 represents rock,1 represents paper and 2 represents scissors. You can create random numbers between 0 and 3 using the following statements: Random ranNumberGenerator-new Random): int randomNumber randomNumber-ranNumberGenerator.Next(min, max); //min value is 0 and max is 3 Sample Outputs Enter r, p, or s for rock, paper, or scissors:ir Computer picked sci You win!! Enter r, p, or s for rock, paper, or scissors: p Computer picked paper It's a Tie!!! Enter r, p, or s for rock, paper, or scissors: r Computer picked paper You lose Your program should include your Full Name, Assignment Name, Date and description as a comment on the top of your application. Submit RockPaperScissors.cs fileStep 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