Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that calculates the cost of a meal at Burger Palace based on the

ID: 3662816 • Letter: W

Question

Write a program that calculates the cost of a meal at Burger Palace based on the following chart of costs. Be sure to include 8.25% Sales Tax on every order.

Burger Palace Costs


Here is an example program dialogues to guide your efforts:

Lemme Calculate Your Meal At Burger Palace!
How Many Hamburgers? 1
How Many Cheese Burgers? 1
How Many Fries? 1
How Many Sodas? 1
Your Order Costs $5.95 Including 8.25% Sales Tax! Enjoy Your Meal!

Your program should properly request input from the user and use constants to represent certain fixed values.

Burger Palace Costs

Type Amount Hamburger $1.50 Cheese Burger $2.00 French Fries $1.00 Soda $1.00

Explanation / Answer

I have done it in CodeBlocks IDE

#include <iostream>
#define HAMBURGERS 1.50
#define CHEESE 2.00
#define FRIES 1.00
#define SODAS 1.00

using namespace std;

int main()
{
float Hamburgers=0,CheeseBurgers=0,Fries=0,Sodas=0,totalCost=0,percentage;
cout << "Lemme Calculate Your Meal At Burger Palace!" << endl;
cout << "How many Hamburgers ?" << endl;
cin >> Hamburgers;
cout << " How many Cheese Burgers ?" << endl;
cin >> CheeseBurgers;
cout << "How many Fries ?" << endl;
cin >> Fries;
cout << "How many Sodas ?" << endl;
cin >> Sodas;
totalCost=((Hamburgers*HAMBURGERS)+(CheeseBurgers*CHEESE)+(Fries*FRIES)+(Sodas*SODAS));
percentage=(8.25/100)*totalCost;
totalCost+=percentage;
cout << "Your Order Costs $"<<totalCost <<"Including 8.25% Sales Tax! Enjoy Your Meal!" << endl;
cout << "Hello world!" << endl;
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote