Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

create a console-based program that: Generates a random number. Allows a user to

ID: 3660617 • Letter: C

Question

create a console-based program that: Generates a random number. Allows a user to guess it. Displays a message indicating whether the guess is too low, too high, or correct. Save the file as GuessingGame1.cs. Now modify that program so that the user can continue to enter values until the correct guess is made. After the user guesses the number correctly, display the number of guesses made. Save the file as GuessingGame2.cs. Next, modify the GuessingGame2.cs program so that the player is criticized for making a dumb guess. For example, if the player guesses that the random number is 4 and is told that the guess is too low, and then the player subsequently makes a guess lower than 4, display a message that the user should have known not to make such a low guess. Save the file as GuessingGame3.cs. Embed the programs in a Microsoft Word document.

Explanation / Answer

code: using System; using System.Collections; using System.Collections.Generic; using System.Text; namespace SampleConsole { interface Values { void show(Stack s); } interface GenerateRandomValues { void Display(); } public class class1 : Values { public static int num, valuerange; public void show(Stack s) { for (int i = 1; i