Imagine that you and a number of friends go to a luxury restaurant, and when you ask for the bill you want to split the amount and the tip (15 percent) between all. Write pseudocode (in Java style) for calculating the amount of money that everyone has to pay. Your program should print the amount of the bill, the tip, the total cost, and the amount each person has to pay. It should also print how much of what each person pays is for the bill and for the tip.
Step 1:START
Step 2:INPUT bill,n //n refers to the total number of people and bill is the amount excluding the tip
Step 3:DIM tip //DIM means declare in Memory
Step 4:tip=(15*bill)/100
Step 4:DIM total
Step 5:total=bill+tip
Step 6:DIM split_amount
Step 7:split_amount=total/n
Step 8:DIM split_amount_bill,split_amount_tip
Step 9:split_amount_bill=bill/n
split_amount_tip=tip/n
Step 10:DISPLAY bill,tip,total,split_amount,split_amount_bill,split_amount_tip
Step 11:STOP
If you want the program for this then please let me know
Get Answers For Free
Most questions answered within 1 hours.