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 points
The file HWeclipse.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 in
the minutes column and in the seconds column, corresponding to minutes and seconds of
totality, or 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
HWtimes.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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
