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.
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
Comments
Leave a comment