0

Restaurant Bill

Hello I am beginning C++ and I was wondering if and how I can figure out the write answer or if it is acurate this is what I have gotten so far... Write a program that computes the tax and tip on a restaurant bill for a patron with a $44.50 meal charge. The tax should be 7 percent of the meal cost. The tip should be 15 percent of the total after adding the tax. Display the meal cost, tax amount, tip amount, and total bill on the screen. //C++ Program Restaurant Bill //Gabriel Reyes January 7, 2022 CIS-5 #include<iostream> using namespace std; int main() { //declare variables double Meal_Charge = 44.50; double Tax = 0.07; double Price_After_Tax = 0.0; double Tip = .15; double Total_Cost = 0.0; //input section Price_After_Tax = Meal_Charge * Tax; Total_Cost = Price_After_Tax * .15; //processing section cout << "The Meal Charge is" << Meal_Charge << endl; cout << "The Tax is" << Tax << endl; cout << "The Tip is" << Tip << endl; cout << "The Price after Tax is" << Price_After_Tax << endl; cout << "The Total Cost is" << Total_Cost << endl; //output section return 0; } //end of main Any fixes and tips would be much appreciated thank you!

7th Jan 2022, 11:52 PM
Gabriel Reyes
4 Answers
0
meal = 44.5 tax = meal * 0.07 tip =(meal+tax)*0.15 total = meal + tax + tip
8th Jan 2022, 3:00 AM
Shadoff
Shadoff - avatar
0
well this is the question if you are wondering "Write a program that computes the tax and tip on a restaurant bill for a patron with a $44.50 meal charge. The tax should be 7 percent of the meal cost. The tip should be 15 percent of the total after adding the tax. Display the meal cost, tax amount, tip amount, and total bill on the screen."
8th Jan 2022, 5:57 PM
Gabriel Reyes
0
nvm i saw the question in the code, thank you!
8th Jan 2022, 6:00 PM
Gabriel Reyes