Question: Need help coding this: A console application that will find the average, minimum, and maximum of a set of numbers. The console application asks the

Need help coding this:

A console application that will find the average, minimum, and maximum of a set of numbers.

  1. The console application asks the user to enter five numbers and then calculate the average. You'll also need to find the minimum and maximum.

Operation:

  1. Ask the user to enter 5 numbers.
  2. After entering the numbers, the numbers are printed to the console, along with the calculated average, minimum, and maximum.
  3. Ask the user if they would like to save the results to a text file. If they choose yes, save the results and exit. If they choose no, just exit.

Specifications:

  1. The user should be allowed to enter positive, negative, and decimal numbers.
  2. Use loops to collect and display the user's input.

You must have a 'function'

  1. Your function must take an Array (or Vector) as a parameter!
  2. Your function needs to return the average of the Array or Vector.
  3. Your function must not print anything to the console (or file)!
  4. You do NOT need to create functions for the following (but you can add them if you want): Minimum, maximum, save/print to file.
  5. Do not use any global variables.
  6. Along with displaying/saving the average, minimum, and maximum; use a loop to print the numbers in reverse order of how they were 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 Programming Questions!