Computer Science, asked by chaithrat01, 7 months ago

In this scenario, two friends are eating dinner at a restaurant. The bill comes in the amount of 47.28 dollars. The friends decide to split the bill evenly between them, after adding 15% tip for the service. Calculate the tip, the total amount to pay, and each friend's share, then output a message saying "Each person needs to pay: " followed by the resulting number.

Answers

Answered by anithasekaran102
46

Answer:

the below code is written in python for the above question :

bill = 47.28

tip = bill * 0.15

total = bill + tip

share = total/2  

print("Each person needs to pay:"+str(share))

o/P:

27.186

Explanation:

Answered by jshemanth9573
7

Answer:Amount=47.28

tip=7.092

Total amount to pay=47.28+7.092=54.372

Each person Share=54.372/2=27.186

Each Person Need To Pay=27.186

Explanation:

  1. Here the bill is 47.28 dollars.We need to add 15% of tip
  2. To calculate 15% of the tip multiply the bill with 0.15
  3. i.e., 47.28*0.15=7.092
  4. After adding the tip the total amount to pay is  47.28+7.092=54.372
  5. Finally we had to calculate the each person share.there are 2 friends so we have to split the bill between the 2 of them the way to do that is divide the total bill by 2
  6. i.e.,54.372/2=27.186

That's it!! Have a Good Time To you

Similar questions