The assignment is to have a program with a cars milesgallon


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: The assignment is to have a program with a cars milesgallon
Reference No:- TGS02944560

Now Priced at $10 (50% Discount)

Recommended (98%)

Rated (4.3/5)