Ask Question
28 June, 23:24

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

+4
Answers (1)
  1. 29 June, 00:28
    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?
Find 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 you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers