Question: Language is C# Part A-2: Readlnteger Create a method called Readinteger that will ask the user to input a number. The method should show a

Language is C#

Language is C# Part A-2: Readlnteger Create a method called Readinteger that

Part A-2: Readlnteger Create a method called Readinteger that will ask the user to input a number. The method should show a prompt, read the user's input (Console.ReadLine maybe?), and return the integer. Console.ReadLine will give you a string so you will need to convert the string to an integer. DO NOT THROW AN UNHANDLED EXCEPTION. If the user does NOT enter an integer OR the integer is not within the min-max range, show an error message to them, show the prompt again and ask for the user's input. You'll need a loop for this. Do not return until the user enters a valid integer. NAME RETURNS PARAMETERS COMMENTS Show the prompt, read input, return integer Readinteger int string prompt int min int max

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!