Tuesday, October 17, 2006

Create a MPG program:

  • Three variables: One for MPG, one for distance, and one for gas used.
  • Initialize the program first for the distance to Orlando and the amount of gas you believe would be used. Pretend the first vehicle is a Hummer.
  • Do calculation.
  • Display MPG to screen.
Once this is complete you need to prompt the user for the miles driven and the gallons of gas used. You will return the miles per gallon.

No comments: