//Zachary Abdollahi CS1A Chapter 3, P. 143, #1
//
/*******************************************************************************
*
* MILES PER GALON
* _____________________________________________________________________________
*
* This program calculates a car's gas mileage based on the number of gallons of
* gas the car can hold and the number of miles it can be driven on a full tank.
*
* Computation is based on the formula:
* Miles per Gallon = Miles Driven / Gallons of Gas
* _____________________________________________________________________________
*
* INPUT
* gallons : Number of gallons of gas the car should hold
* miles : Number of miles driven on a full tank
*
* OUTPUT
* milesPerGallon : Number of miles the car gets per gallon
*
******************************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
float gallons; //INPUT - Number of gallons of gas the car can hold
float miles; //INPUT - Number of miles driven on a full tank
float milesPerGallon; //OUTPUT - Miles per gallon
//
// Get Input from User
cout << "Enter the number of gallons of gas the car can hold: ";
cin >> gallons;
cout << "Enter the number of miles the car can be driven on a full tank: ";
cin >> miles;
//
// Compute Miles Per Gallon
milesPerGallon = miles / gallons;
//
// Output Result
cout << "The car gets " << milesPerGallon << " miles per gallon." << endl;
return 0;
}