Reference no: EM132168394
Using C++ how would I do the following:
Write a program that prompts the user for the prices of 10 automobiles (use looping to do this and store the prices in an array).
The automobiles may be priced from less than $1 up to $99,999.
No negative numbers are allowed. Perform error checking to ensure that only valid numbers are entered ($1 - $99,999).
Using a function, calculate and display the number of cars in all 10 price categories, i.e., $1 - $9999, $10,000 - $19,999, $20-000 - $29,999, ... $90,000 - $99,999. Call a function that loops through the array, and displays the highest and lowest priced cars only.
Call a separate function which calculates the average of all of the cars, and passes the average amount back to the main() function, where it is printed out.