Question: 1 . Financial application: calculate tip Write a program named LastNameTip that reads the subtotal and the gratuity rate and then computes the gratuity and
Financial application: calculate tip
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 for the subtotal, and for the gratuity rate, the program displays $ as gratuity and 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.
Here is a sample run; the bold represents the input from the user:
Enter the subtotal:
Gratuity rate in :
The Gratuity is $ and the total is $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
