Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A salesperson leaves his home every Monday and returns everyFriday. He travels b

ID: 3613454 • Letter: A

Question

A salesperson leaves his home every Monday and returns everyFriday. He travels by company car. Each day on the road, he recordsthe amount of gasoline put in the car. Given the starting odometerreading(the odometer reading before he leaves on Monday) and theending odometer reading (the odometer reading after he returns homeon Friday), design an algorithm to find the average miles pergallon.

Data is given in the following format:
startOdometerReading endOdometerReading gUsedD1 gUsedD2gUsedD3 gUsedD4 gUsedD5

(Here,gUsedD1 means gas used on Day 1, and so on.) A sample data isas follows:
68723 71289 15.75 16.30 10.95 20.65 30.00

Explanation / Answer

x.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote