struct quiz

struct quiz - terminates the input. 7) Prompt for and...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 1) Define a struct named GasData to hold the miles, gallons and mpg for each tank of gas purchased. 2) Define a pointer to GasData type data to point to an array of the structs. 3) Dynamically allocate an array of GasData structs using the pointer. 4) Display a title followed by a blank line. 5) Prompt for and accept the initial mileage. 6_ Display information indicating that an input value of 0 for miles
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: terminates the input. 7) Prompt for and accept the odometer miles and gallons for each gas purchase. 8) Calculate and display the mileage (mpg) for each gas purchase after its data is input. 9) After all data has been input, calculate the overall mileage(mpg_. 10) Display the overall mileage and a termination message "Done."...
View Full Document

Ask a homework question - tutors are online