Question
I need help with this C# code. - Please add comments to your program. 1. Write a program that generates a random number between 1
I need help with this C# code. - Please add comments to your program. 1. Write a program that generates a random number between 1 and 5 and then use a case statement to produce different lines of dialog from a character in a video game. You will need to come up with the 5 lines of dialog on your own. Your program should start its output by telling us what number it generated and then produce the line of dialog. Output: Random number generated was: 3 **This is what I have so far. I'm having issues with the random part of the coding. private static readonly object random; static void Main(string[] args) { Random random = new Random(); int randomNumber = random.Next(0, 6); int menuChoice = 1-5; switch (menuChoice) { case 1: Console.WriteLine("I refuse to bury any more friends."); break; case 2: Console.WriteLine("Uldren Sov is mine."); break; case 3: Console.WriteLine("Such simplicity. Such contours! Been inside the Traveler, you know. Smells faintly of vanilla."); break; case 4: Console.WriteLine("Glory in the crucible, is the truest immortality a guardian can attain."); break; case 5: Console.WriteLine("Tell a Titan only a madman would go. Tell a Warlock it's too complex."); break; } } } } This is C# coding. Thank you
Step 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