[SOLVED] ITSE2321 Program 2 – user’s daily driving cost

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Program2-3iharm.zip (2.3 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

The daily driving cost is based on total miles driven per day, cost per gallon of gas, average miles per gallon, parking fees per day, and tolls per day using the formula below:

Daily Driving Cost = Cost Per Gallon * Total Miles Driven ÷ Average Miles Per Gallon                                    +  Parking Fees Per Day + Tolls Per Day

Write a program that calculates a user’s daily driving cost.  The program should ask the user for the following data and display the user’s cost per day.  Format your output to two decimal places:

  1. Total miles driven per day
  2. Cost of gallon of gasoline
  3. Average miles per gallon of gasoline
  4. Parking fees
  5. Tolls per day

 

Run your program two times, with the following data, and copy and paste the output to a file.

 

  Run 1 Run 2
 

Total miles driven per day

Cost of gallon of gasoline

Average miles per gallon of gasoline

Parking fees

Tolls per day

 

 

25

$2.25

24

$2.45

$2.50

 

40

$2.25

30

$5.00

$1.45

 

 

Create a folder named, fullname_program2.  Copy your source code and the output file to the folder.  Zip the folder and upload it to Blackboard.

 

  • Program2-3iharm.zip