//Cameron Pham             CS1A                       Chapter 3, P. 143, #1
//
/*******************************************************************************
 * 
 * Calculate Miles Per Gallon
 * _____________________________________________________________________________
 * 
 * This program calculates a car's gas mileage in miles per gallon (MPG).
 * 
 * Computation is based on the formula:
 * Miles per Gallon = Miles Driven / Gallons of Gas
 * _____________________________________________________________________________
 * 
 * INPUT
 *	gallons		   : Number of gallons of gas the car can hold
 *  miles          : Miles the car can travel on a full tank
 * 
 * OUTPUT
 *  milesPerGallon : The car's miles per gallon (MPG)
 * 
 ******************************************************************************/
#include <iostream>
using namespace std;

int main() 
{
	// Declare variables to store the user's input and the MPG calculation.
	double gallons;
	double miles;
	double mpg;
	
	// Ask the user how many gallons of gas the car can hold.
	cout << "Enter the number of gallons the car can hold: ";
	cin >> gallons;
	
	// Ask the user how many miles the car can travel on a full tank.
	cout << "Enter the number of miles the car can be driven on a full tank: ";
	cin >> miles;
	
	// Calculate miles per gallon by dividing the total miles by the gallons.
	mpg = miles / gallons;
	
	// Display the calculated miles per gallon.
	cout << "The car gets " << mpg << " miles per gallon." << endl;
	
	return 0;
}