C++, need a two page writeup for the code (mpg=miles/gallon)
/* About the Milage Calculator program This C++ program calculates miles driven per gallon by a vehicle. The user nneds to input total Miles driven by the vehicle & the total no. of gallons consumed by the vehicle */ #include <iostream> using namespace std; int main() { float miles; // Variable miles : Total Miles driven float gallons; // Variable gallons : Total no. of gallons consumed by vehicle float mpg; // Variable gallons : Total no. of gallons consumed by vehicle cout << "Enter miles: "; // Program prompts for total miles driven cin >> miles; // User input for total miles cout << "Enter gallons: "; // Program prompts for total gallons of fuel consumed cin >> gallons; // User input for total gallons of fuel consumed mpg = miles / gallons; // Program calculates MPG by dividing miles by gallon cout << "Miles per gallon: " << mpg; // Program displays the MPG return 0; }