Note real per-mile cost would also include maintenance and


2.13 Variables/Assignments: Driving costs

challenge

activity

2.13.1: Driving costs.

Reset

Driving is expensive. The assignment is to have a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles.

Ex: If the input is 20.0 3.1599, the output is:

1.57995 7.89975 63.198

Note: Real per-mile cost would also include maintenance and depreciation.

Solution Preview :

Prepared by a verified Expert
Business Management: Note real per-mile cost would also include maintenance and
Reference No:- TGS02935056

Now Priced at $10 (50% Discount)

Recommended (94%)

Rated (4.6/5)