Question: Suppose you have this structure: struct gas { float distance; float gals; float mpg; }; Write a function that takes a struct gas argument. Assume
Suppose you have this structure: struct gas { float distance; float gals; float mpg; }; Write a function that takes a struct gas argument. Assume that the passed structure contains the distance and gals information. Have the function calculate the correct value for the mpg member and return the newly completed structure. Test your program with 5 inputs. This is a C program.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
