Question: Ive been working on this code and Ive got myself lost. Im only supposed to have 3 methods, but I feel like I cant do

Ive been working on this code and Ive got myself lost. Im only supposed to have 3 methods, but I feel like I cant do it with only 3 methods so Ive just been playing around with the code and have it all screwed up now.

The objectives are as follows.

C# program that will accept multiple values from user and let them know if its in acceptable range of 0 to 100.

Requirements

1-create a method that will display the instructions and information about the program.

2-create a method that displays the prompt as to whether you wish to enter another value

3-create a method that requests the input from the user

Here is my crappy code.

________________________________________

using System; using static System.Console; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;

namespace Chapter6Homework1 { class Ch6Program1 { static void Main(string[] args) { int value; string moreEntries;

}

//Display Instructions public static void DisplayInstructions() { WriteLine("***** ***** ***** ***** ***** *****"); WriteLine(" This application lets you enter as many values as you want."); WriteLine(" It will then test the values you entered to see if they are within the acceptable range of 0 to 100"); }

//Input From User public static double GetInput() { double value; WriteLine("Please enter a positive value less than 100:"); if (double.TryParse(ReadLine(),out value) == false) { WriteLine("Invalid value entered"); } return value; }

//Enter another value question public static void GetMultiInput() { string moreEntries; WriteLine(" Would you like to enter another value? Enter Y to continue or N to exit and get results."); moreEntries = ReadLine(); return moreEntries;

}

//Enter correct display values public static void DisplayResults() { WriteLine(" Number of Valid values entered during testing: *****show number of values entered*"); WriteLine("Number of Invalid values entered: ******show number of invalid values entered for testing*"); WriteLine(" Values outside of range: *******show number outside range*"); WriteLine("Non - Numeric values entered: *******show number of non - numeric vaues entered*"); } } }

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!