//Adam Sanchez CIS5 Chapter 2, P. 82, #10
//
/*******************************************************************************
*
* COMPUTE NUMBER OF MILES PER GALLON
* _____________________________________________________________________________
* This program computes a cars number of miles per gallon with a given
* amount of gas and miles.
*
* Computation is based on the formula:
* MPG = Miles Driven / Gallons of Gas Used
* _____________________________________________________________________________
* Input
*
* Output
*
******************************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
float miles; //INPUT - amount of miles driven
float gallonofgas; //INPUT - amount of gallons of gas used
float mpg; //OUTPUT - amount of mile travlled for every gallon of gas used
//
// Initialize Program Variables
miles = 350;
gallonofgas = 12;
//
// Compute Amount Of Miles Per Gallon Of Gas
mpg = miles / gallonofgas;
//
// Output Results
cout << "The car gets " << setprecision(2) << mpg;
cout << " miles per gallon of gas." << endl;
return 0;
}