Question: Write a program named LastNameTip that reads the subtotal and the gratuity rate and then computes the gratuity and total. For example, if the user

Write a program named LastNameTip that reads the subtotal and the gratuity rate and then computes the gratuity and total. For example, if the user enters 10 for the subtotal, and 15% for the gratuity rate, the program displays $1.50 as gratuity and 11.50 as total. The program should let the user know if they have entered a subtotal or a gratuity rate that is negative and if so, the program should end without doing any math.

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!