Assignment: #CommuteCalculator Due: 11/17/2017 Points: 5

Specfication

This program calculates the cost of a commute. The calculation requires the following inputs.

Prompt the user to enter the aforementioned data and compute how much money per month is spent on gas.

Use int variables for all the data except for the price of gas -- use a double to store that.

The formula for this part is similar to the following:

Example Run

Note: Numbers enclosed in <angle brackets> are user inputs. Your prompts should match those used in this example.

   How many miles round-trip a day do you commute? <22>
   How many days a week do you commute? <4>
   How many weeks a year do you commute? <39>
   How many miles per gallon does your vehicle get? <23>
   What is the current per gallon price of gas? <1.21>

The program output for a single calculation should look as follows.

   22 miles a day
   4 days a week
   39 weeks a year
   23 miles per gallon
   $1.21 per gallon
   monthly gas expense:  $15.0461

Prompt the user if they'd like to do another cost of commute calculation. If they enter 'Y' or 'y', then repeat; otherwise, print the following and exit the program.

   This program executed X cost of commute calculations.
   Total commute miles: Y       Average commute cost: $z

The following is another example that doesn't include the prompts, but does include yearly data for each calculation.

   22 miles a day
   4 days a week 
   39 weeks a year
   23 miles per gallong
   $1.21 per gallon
   monthly gas expense: $15.0461   (yearly miles: 3432; yearly cost: $180.553)

   Do another calculation ('Y' or 'y'): y

   10 miles a day
   5 days a week
   50 weeks a year
   25 miles per gallon
   $2.40 per gallon
   monthly gas expense: $20   (yearly miles: 2500; yearly cost: $240)

   Do another calculation ('Y' or 'y'): n

   This program executed 2 cost of communte calculations.
   Total commute miles: 5932   Average commute cost: $17.523