//Castulo Jason Quintero CSC5 Chapter 2, P. 83, #10
//
/**************************************************************
*
* COMPUTE MPG ON FULL TANK OF GAS
* ____________________________________________________________
* This program computes the MPG a car can travel on one
* tank of gas based on gas tank capacity and range of
* miles that can be driven before refueling.
*
* Computation is based on the formula:
* MPG = Range of Miles that can be driven / Number of Gallons
* ____________________________________________________________
* INPUT
* tankCapacity : Gas tank capacity in gallons
* mileRange: Range of Miles that can be driven
*
* OUTPUT
* MPG : MPG car can travel
*
**************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
float tankCapacity; //INPUT - Gas tank capacity in gallons
float mileRange; //INPUT - Range of Miles that can be driven
float MPG; //OUTPUT - MPG car gets
//
// Initialize Program Variables
tankCapacity = 12.0;
mileRange= 350.0;
//
// Compute MPG Traveled Highway
MPG = mileRange / tankCapacity;
//
// Output Result
cout << "The car gets " << MPG << " miles per gallon." << endl;
return 0;
}