Question #290572

Write the pseudocode for the following scenario which calculates the final amount a customer at a restaurant will pay at the till. The amount of the bill will be input first. Thereafter VAT (15%) will be calculated and added to the bill as well as a tip for the waiter (10% of the bill – on top of the added VAT). The final receipt of the bill must be printed out for the customer.


Expert's answer

Start
  Declare Real amountBill
  Declare Real VAT
  Declare Real tipWaiter
  Display "Enter amount bill: "
  Input amountBill
  VAT=0.15*amountBill
  tipWaiter=0.1*amountBill
  amountBill=amountBill+VAT+tipWaiter
  Display "VAT: ", VAT 
  Display "A tip for the waiter: ", tipWaiter
  Display "The final bill: ", amountBill
Stop

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS