Read from a file and display on a file (File I/O)

Hello everyone. For an assignment, I'm supposed to read the file, compute the needed information (min, max, avg) and output to a file. I'm completely lost.

This is the data file:

Ticket Price
A31 149.99
B31 49.99
A41 179.99
F31 169.99
A35 179.99
A44 169.99

And, that is supposed to be look like this:


*******************************************

There are X tickets in the database.

Maximum Ticket price is $XX.XX.
Minimum Ticket price is $XX.XX.
Average Ticket Price is $XXX.XX.

******************************************
Topic archived. No new replies allowed.