Question: C + + a . Declare a structure data type with the following fields: Car id ( integer ) , Miles Driven ( integer )
C
a Declare a structure data type with the following fields:
Car id integer Miles Driven integer Gallons Used integer
b Using the data type declared for in a write a C program that accepts the total number of cars assume that there are at most cars and then reads them in
For example
c After the data has been entered, the program should print each car's id and the car's miles per gallon, as a float At the end of this, print out also the average mpg for the entire fleet of cars followed by the ids of the cars that have above average
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
