Ask Question
30 January, 02:14

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

+2
Answers (1)
  1. 30 January, 02:38
    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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers