Menu

(Get Answer) – Write A Consoleapp In C

Question Description

I need to write a C# program in Visual Studio that lets a user input a set of positive numbers. The program should display a result that shows the number of valid numbers entered, the largest number and the smallest number.

Your program should be implemented using two classes.

  • The class named Numbers: Implement class as depicted in the class diagram. The method readNumbers should read the numbers repeatedly from the user, until they decide to stop. You have to use a while loop for this part. After the user is done entering numbers, the result should be displayed.
  • Write a test class for that uses class Numbers. Use this class to demonstrate that your program works. This is a sample output for the program:Entera positive number (or negative number to quit): 54Entera positive number (or negative number to quit): 2Entera positive number (or negative number to quit): 8Entera positive number (or negative number to quit): 3Entera positive number (or negative number to quit): 9Entera positive number (or negative number to quit): 1Entera positive number (or negative number to quit): -1RESULTNumbersentered: 6Largestnumber: 54Smallestnumber: 1
HTML tutorial

Leave a Reply

Your email address will not be published.