1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
devlian [24]
3 years ago
8

Write a program that computes the tax and tip on a restaurant bill for a patron a $88.67 meal charge. The tax should be 6.75 per

cent of the meal cost. The tip should be 20 percent of the total after adding the tax. Display the meal cost, tax amount, tip mount, and total bill on the screen.
Computers and Technology
1 answer:
Lina20 [59]3 years ago
5 0

Answer:

C++ code is writtern below with explanation in comments

Explanation:

#include <iostream>

using namespace std;

int main()

{

//declare all the required fields in double format

   double mealCost =88.67;

   double taxPercenatage=6.75;

   double tipPercentage=20;

// displaying the original Meal Cost

   cout<< "Meal Cost: "<<mealCost<<endl;

// get the total tax percentage from meal cost

   double totalTax= taxPercenatage /100 * mealCost;

// display the tax amount

   cout<< "Tax Amount: "<<totalTax<<endl;

// getting tip amount from meal cost and tax amount.

   double totalTip = tipPercentage/100 * (mealCost+totalTax);

//displaying tip amount

   cout<< "Tip Amount: "<<totalTip<<endl;

// now adding all three values and get total amount that customer

// has to pay

   double totalAmount = mealCost+totalTax+totalTip;

//Displaying total amount

   cout<< "Total Bill: "<<totalAmount<<endl;

   return 0;

}

Output

Meal Cost: 88.67

Tax Amount: 5.98523

Tip Amount: 18.931

Total Bill: 113.586

You might be interested in
Suppose we want an error correcting code that will allow all single-bit errors to be corrected for memory words of length 15. 1.
alexira [117]

Answer:

15

Explanation:

01234567891011121314

5 0
2 years ago
Write a story, a tale, a biography or a diary.
antoniya [11.8K]
I will write a very short story, so I hope this helps a little

The processing of gold: A diary entry

April 5/2018

I am the worlds most precious metal. 
I am worth more than any silly diamond, and far more stronger than Iron. No one can come close to being as important as I.

I start as a tiny mineral, found underground where I spend my days perfecting myself. Most might find relatives of mine in water, buried among sand and dirt. Then we are put through the most rigorous of training until we are god.

Well, gold, but you know what I mean.

Once I am perfection, I will be sold among the masses of people.   I will be loved my all and crafted into everything. If I wanted, I could take over the world...a world of just gold, wouldn't that be magical?

Today I think I will be made into a ring, I hope I am not squeezed on some fat woman's finger.

I hope this helps a little, Cheers :)

6 0
3 years ago
Write a loop that continually asks the user what food the user has in their refrigerator until the user enters apples, in which
almond37 [142]

(Disclaimer: I am not a professional, so it might not be the most concise answer possible, but I did run the Python script and it works)

Answer:

user_input = input("What food do you have in your refrigerator? ").lower()

count = 0

while True:

   if user_input != 'apples':

       count += 1

       print(f'You have a {user_input} with a total of {count} food(s)\n')

       user_input = input("What food do you have in your refrigerator? ")

   else:

       break

7 0
2 years ago
A service specialist from your company calls you from a customer's site. He is attempting to install an upgrade to the software,
IgorLugansk [536]

Answer:

kill 1000

Explanation:

3 0
3 years ago
The Java compiler does not check for an ArrayIndexOutorBoundsException during the compilation of a program containing arrays. O
yulyashka [42]

Answer:

TRUE

Explanation:

  • Let us first understand what is an ArrayIndexOutOfBounds Exception.
  • As the name itself suggests the index for the array has gone out of bound (permissible value) and an exception (anamoly) is resulted.
  • So, it throws an error.
  • That means if an array, Employee of size n is defined then the permissible elements are Employee[0] to Employee[n-1]. If any negative index or with the index is greater than n-1 is tried to access it throws an error saying ArrayIndexOutOfBounds Exception.
  • In java, during the compilation of the program the compiler doesn't check for the ArrayIndexOutOfBounds Exception.It checks during running the program.
  • So, it is called a Runtime Exception.
7 0
3 years ago
Other questions:
  • When a user receives an email warning about the dire consequences of possible virus attacks on their pc or tablet, it is often a
    6·1 answer
  • 1. Why is it important to compare features of a computer before making a purchase?
    13·2 answers
  • A device which lets you interact with the computer
    6·2 answers
  • _____ refers to the busiest calling hour of the day, week, month or year. And _____ refers to the average length of time the sub
    14·1 answer
  • What are the top and side margins for a letter typed in standard format?
    11·1 answer
  • Union Carbide accident safety policies and procedures were not followed was due to
    14·1 answer
  • A powerboat is about to cross paths with a sailboat under sail. What should the powerboat do
    5·1 answer
  • "Packet switches have multiple links attached to them. For each attached link the packet switch has a/an ____________, which sto
    7·1 answer
  • Importancia del sistema operativo
    6·1 answer
  • How to count the total number of users from backend reactjs.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!