//Chloe Yau CIC5 Chapter 3, P. 143, #1
//
/*******************************************************************************
*
* COMPUTING MILES PER GALLON
* _____________________________________________________________________________
* This program calculates a car's gas mileage and display the values on the
* screen by entering the number of gallons of gas the car can hold and the
* number of miles it can be driven on a full tank.
* _____________________________________________________________________________
* INPUT
* gallons : Gas tank capacity in gallons
* miles : The number of miles the car can drive on a full tank
* OUTPUT
* milesPerGallon : Miles that can be driven per gallon of gas
*
******************************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
float gallons; // INPUT - Gas tank capacity in gallons
float miles; // INPUT - Number of miles the car can drive on a full tank
float mpg; // OUTPUT - Miles that can be driven per gallon of gas
//
// Ask for User Inputs for Gallons and Miles
cout << "How many gallons the car can store: ";
cin >> gallons;
cout << gallons;
cout << "\nHow many miles the car can drive with a full tank: ";
cin >> miles;
cout << miles;
//
// Computing Miles Per Gallon
mpg = miles / gallons;
//
// Display Output Result
cout << "\nThe car can drive for " << mpg;
cout << " miles per gallon.";
return 0;
}