Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions