Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribed

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 file

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

Database And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions