//Jeremy Huang CS1A Chapter 3, P. 143, #1
//
/**************************************************************
*
* COMPUTE MPG
* ____________________________________________________________
* This program computes the miles per gallon in a car by taking
* the amount of miles it can travel on a full tank and dividing
* it by its tank capacity.
* ____________________________________________________________
* INPUT
* tankCapacity : Gas tank capacity in gallons
* miles : miles that can be driven on a full tank
*
* OUTPUT
* mpg: the miles per gallon
*
**************************************************************/
#include <iostream>
using namespace std;
int main() {
float tankCapacity; //INPUT - Gas tank capacity in gallons
float miles; //INPUT - miles that can be driven on a full tank
float mpg; //OUTPUT - the miles per gallon
// Ask user for amount of gallons
cout<<"Enter the number of gallons of gas the car can hold: ";
cin>>tankCapacity;
// Ask user for number of miles
cout<<"\nEnter the number of miles that can be driven on a full tank: ";
cin>>miles;
// Compute MPG
mpg = miles/tankCapacity;
// Output Result
cout<<"\nThe car's mpg is: "<<mpg;
return 0;
}