Once the file has been read the program should display the


Declare a single structure type suitable for a car record consisting of an integer car identification number, a float value for the miles driven by the car, and a float value for the number of gallons used by each car. Declare a structure variable using this structure type. Using the structure type declared above, write a C program that loops five times, reading each line of data from the cars.txt file into the members of the structure variable, calculating the mpg for that car, and printing the car number and mpg. Once the file has been read, the program should display the average miles per gallon achieved by the complete fleet of cars.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Once the file has been read the program should display the
Reference No:- TGS01702145

Expected delivery within 24 Hours