/******************************************************************************
* AUTHOR : Aiden Stannard *
* STUDENT ID : 1284603 *
* Ch3, p143, #4 : Miles Per Gallon Calc *
* CLASS : CS1A *
* SECTION : T/Th 6PM - 8:20PM *
* DUE DATE : 9/12/2026 *
******************************************************************************/
/******************************************************************************
* CALCULATE CAR FUEL ECONOMY
* ____________________________________________________________________________
* This program Calculates the fuel economy of a users car by prompting the user
* to enter their car's fuel capacity and range in units of MILES and GALLONS
*
* Computation is based on the formula: GALLONS / MILES = MPG
* __________________________________________________________________________
* INPUT
* Enters the fuel capacity of your cars tank in gallons:___
* Enter the max range of your car on a full tank in miles:___
*
*OUTPUT
* Your car has an estimated fuel economy of:___ Miles Per Gallon
*
******************************************************************************/
#include <iostream>]
using namespace std;
int main()
{
float fuelCap; // The Amount of fuel the car can hold (Gallons)
float carRange; // How far the vehcile can travel on a full tank (Miles)
float MPG; // Miles Per Gallon Value
cout << "Enters the fuel capacity of your cars tank in gallons: \n";
cin >> fuelCap;
cout << "Enter the max range of your car on a full tank in miles: \n";
cin >> carRange;
MPG = carRange / fuelCap;
cout << "Your car has an estimated fuel economy of: " << MPG
<< " Miles Per Gallon";
return 0;
}