Question: Problem 2 ( 9 points ) The file HW 1 3 _ eclipse.txt contains data for some of the US cities that experienced totality during

Problem 2(9 points)
The file HW13_eclipse.txt contains data for some of the US cities that experienced totality
during the recent solar eclipse. It consists of one row of headers, followed by an unknown
number of rows of data. The last row of the file is a single #. In each row of data are six
elements of data: the city name, state, latitude, longitude, minutes of totality, and seconds of
totality. A look at the file shows that the last two columns are not two different ways of stating
the same data, but that they should be combined. For example, the row for Amity, AR lists a 3 in
the minutes column and 45 in the seconds column, corresponding to 3 minutes and 45 seconds of
totality, or 225 seconds of totality.
You are to read in the data from the original file using fscanf, then process it so that the
totality times are presented more clearly and save them to a new file named
HW13_times.txt. Use fprintf to create the new file. The new file should have one
row of header information followed by data in four columns: the city, state, the time of totality
in seconds (as an integer), and the time of totality in the form of xmin,xxsec (as a single
string).
Problem 2 ( 9 points ) The file HW 1 3 _

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!