Answer:
See explaination
Step-by-step explanation:
// Include the required header files.
#include <iostream>
// Include iomanip header file for setprecision().
#include <iomanip>
using namespace std;
// Start of the main() function.
int main() {
// Declare the double type variables for car's miles/gallon
// and gas dollar/gallon as milesPerGallon and
// dollarPerGallon, respectively.
double milesPerGallon, dollarPerGallon;
// Declare and initialize double type variable to hold
// the cost of
double costPerMile=0.0;
// Prompt the user to enter car's miles/gallon and
// gas dollars/gallon value.
cin >> milesPerGallon >> dollarPerGallon;
// Divide dollarPerGallon by milesPerGallon to
// compute the cost of travelling one mile.
costPerMile=dollarPerGallon/milesPerGallon;
// Use setprecision(2) function to display only two
// digits after the decimal point.
cout << fixed << setprecision(2);
// Display the cost per mile for 20 miles, 75 miles,
// and 500 miles, respectively.
cout << 20*costPerMile << " " << 75*costPerMile << " " << 500*costPerMile;
// Return 0 to the main() function.
return 0;
// End of the main() function.
}