//Amari Mosley CSC5 Chapter 3, P. 143, #1
//https://i...content-available-to-author-only...e.com/myrecent
/**************************************************************
*
* Miles Per Gallon
* ____________________________________________________________
* This program calculates a car's gas mileage.
* Computation is based on the following formulas:
* MilePerGal = MaxMile / MaxGal
* ____________________________________________________________
* INPUT
* MaxGal : Number of gallons of gas the car can hold
MaxMile : Number of miles the car can drive on a full tank of gas
* OUTPUT
MilePerGal : Number of miles the car can drive per gallon
*
*
**************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
// Defining Main Function
int main()
{
// Define variables to hold gallons, miles, and miles per gallon
double MaxGal, MaxMile, MilePerGal;
// Ask the user to enter the number of gallons of gas the car can hold
cout << "Enter the number of gallons of gas the car can hold: ";
cin >> MaxGal;
// Ask the user to enter the number of miles it can be driven on a full tank
cout << "Enter the number of miles it can be driven on a full tank: ";
cin >> MaxMile;
// Calculate the miles per gallon
MilePerGal = MaxMile / MaxGal;
// Display the number of miles that may be driven per gallon of gas
cout << "The car's gas mileage is " << MilePerGal << " miles per gallon." << endl;
return 0;
}