#include <iostream>
#include <iomanip>
usingnamespace std;
int main()
{
// Variables
double meal_cost, tax, tip, total_cost;
// Set output for number formatting
cout << setprecision(2) << fixed << showpoint;
// Welcome Message
cout << "WELCOME TO THE BROWARD CAFE!!!\n";
// Ask the user to input the cost of the meal.
cout << "Please enter the total cost of the meal:";
cin >> meal_cost;
// Calculate the tax amount, the tip amount and the total cost of the meal.
meal_cost = meal_cost;
tax = meal_cost * 0.07;
tip = meal_cost * 0.20;
total_cost = meal_cost + tax + tip;
// Display the calculated data.
cout << "Meal Cost: $" << meal_cost << endl;
cout << "Tax: $" << tax << endl;
cout << "Tip: $" << tip << endl;
cout << "Total Cost: $" << total_cost << endl;
return 0;
}
Everything runs fine and it calculates what I want, I just need it to look like this with the space between "Please enter...meal" and "Meal Cost"
WELCOME TO BROWARD CAFÉ!!
Please enter the total cost of the meal: $_40_
Meal Cost: $40.00
Tax: $2.80
Tip: $8.00
Total Cost: $50.80
instead of what it currently looks like...
WELCOME TO BROWARD CAFÉ!!
Please enter the total cost of the meal: $_40_
Meal Cost: $40.00
Tax: $2.80
Tip: $8.00
Total Cost: $50.80