Question: Write a program that computes the tax and tip on a restaurant bill. The program should ask the user to enter the charge for the

Write a program that computes the tax and tip on a restaurant bill. The program should ask the user to enter the charge for the meal. The tax should be 10% of the meal charge. The tip should be 20% of the total after adding the tax. The program should then ask the user if they would like to donate $5.00 to local charities. If the user enters 'y', add the donation to the bill. If the user enters any other value, the donation is not applied. Display the meal charge, tax amount, tip amount, donation value, and total bill on the console.
Make any revisions to your program based on any instructor feedback received.
Prevent the user from entering a negative value for the meal charge. If the user enters a negative value for the meal charge, use a loop to prompt the user of the error and allow the user to re-enter a valid meal charge.
After the total summary has been provided to the user, ask the user if they would like to enter a new meal charge. If they do, have the program repeat. If they do not, provide a closing phrase and exit the program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!