Create a program that reads in a series of sales dollar amounts from a file, stores the
amounts in an array, processes the array, and outputs to a file and the console the
number of sales amounts, the lowest amount, the highest amount, and a complete list
of the amounts in order from lowest to highest. Sample output shown on the next page.
- The maximum number of amounts in the file is 20, but it could have less. The program
must keep track of the number of amounts read in from the file, and stop at the
sentinel. - Required functions: (1) opening the files and file failure conditions, (2) reading the input
and storing the values, (3) sorting the array, (4) writing and displaying the output. - Create an input file named “salesAmounts.txt” with the following values in the order
that they appear below vertically in the file. Zero marks the end of the data set and is
not one of the amounts. The file location must be the project folder.
29.95 3.55 34.70 12.34 2.67 33.89 24.99 18.45 4.99 9.95 0.00 - Recommendation: Use bubble sort in your solution