Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2- Declare a single structure data type suitable for a car structure of the type in the following chart: Car number 25 36 Miles driven

image text in transcribed
2- Declare a single structure data type suitable for a car structure of the type in the following chart: Car number 25 36 Miles driven 1450 3240 1792 2360 2114 Gallons Used 62 136 76 105 67 52 68 Using the data type declared for the program, write a C++ program that interactively accepts the chart's data in an array of five structures. After the data has been entered, the program should create a report listing each car number and the car's miles per gallon. At the end of the report, include the average per gallon for the entire fleet of cars Output: Enter car number: 25 Enter car miles: 1450 Enter car gallons: 62 Enter car number: 36 Enter car miles: 3240 Enter car gallons: 136 Enter car number: 44 Enter car miles: 1792 Enter car gallons: 76 Enter car number: 52 Enter car miles: 2360 Enter car gallons: 105 Enter car number: 68 Enter car miles: 2114 Enter car gallons: 67 Number MPG 25 89900.00 36 440640.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

1. Television more Over watching faceing of many problems ?

Answered: 1 week ago

Question

Is there a link between chronic stress and memory function?

Answered: 1 week ago