Ask Question
25 February, 17:28

4. Restaurant Bill Wricc a program that computes the tax and tip on a restaurant bill for a patron with a $88.67 meal charge. The tax should be 6.75 percent of the meal cost. The rip should 82 Chapter 2 Introduction to C+ + be 20 percent of the toral after adding the tax. Display che meal cost, tax amount, tip amount, and coral bill on the screen

+3
Answers (1)
  1. 25 February, 19:04
    0
    The code is written in C++:

    #include using namespace std; int main () { double cost = 88.67; double tax = 88.67 * 0.0675; double tip = 0.2 * cost * tax; double total = cost + tax + tip; cout<< "The total bill is $" << total; return 0; }

    Explanation:

    Firstly, let's declare and initialize the variable cost (Line 7). We just assign 88.67 cost value as given in the question.

    Next, we declare variable tax, tip and total and apply the calculation formula to work out the value for each variable (Line 8-9).

    At last, display the total to the console terminal (Line 12).
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “4. Restaurant Bill Wricc a program that computes the tax and tip on a restaurant bill for a patron with a $88.67 meal charge. The tax ...” in 📙 Business if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers