Assume that you have a file that contains the weekly average prices for a gallon of gas

Question:

Assume that you have a file that contains the weekly average prices for a gallon of gas in the United States for the past 3 years. The data is stored in the file as records. Each record contains the average price of a gallon of gas on a specific date. Each record contains the following fields:

The month, stored as an integer. January = 1, February = 2, etc.

The day of the month, stored as an integer.

The year, stored as an integer.

The average price of a gallon of gas on the specified date, stored as a real number, rounded to 3 decimal places.

Design a program that reads the file and displays the lowest and highest gas prices, as well as the dates for those prices.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: