public static void Main(string[] args)
output("Enter a positive integer or a negative value to quit: " + "\n");
@inputValue = (int) inputValue();
if (@inputValue > lastInputValue)
lastInputValue = highValue;
if (@inputValue < lastInputValue)
lastInputValue = lowValue;
output("Enter a positive integer or a negative value to quit: " + "\n");
@inputValue = (int) inputValue();
output("Largest value entered: " + highValue + "\n");
output("Smallest value entered: " + lowValue + "\n");
output("The average of the values: " + average + "\n");
output("No numbers were entered." + "\n");
private static double inputValue()
while (!double.TryParse(Console.ReadLine(), out result));
private static string inputText()
return Console.ReadLine();
private static void output(string text)