Write the Pseudocode for the following programming problem. Write a program that
ID: 3704121 • Letter: W
Question
Write the Pseudocode for the following programming problem.
Write a program that will calculate a tip based on the meal price and a 6% tax on a meal price. The user will enter the meal price and the program will calculate tip, tax, and the total. The total is the meal price plus the tip plus the tax. Your program will then display the values of tip, tax, and total.
The tip amounts based on the mean price are as follows:
Meal Price Range
Tip Percent
.01 to 5.99
10%
6 to 12.00
13%
12.01 to 17.00
16%
17.01 to 25.00
19%
25.01 and more
22%
Meal Price Range
Tip Percent
.01 to 5.99
10%
6 to 12.00
13%
12.01 to 17.00
16%
17.01 to 25.00
19%
25.01 and more
22%
Explanation / Answer
Here is the pseudocode..
===============================================================
Start:
Step:1 Input Meal Price.
Step:2 IF MealPrice >= .01 AND MealPrice <=5.99
Tip = MealPrice * 0.1
Step:3 IF MealPrice >= 6 AND MealPrice <=12.00
Tip = MealPrice * 0.13
Step:4 IF MealPrice >= 12.01 AND MealPrice <=17.00
Tip = MealPrice * 0.16
Step:5 IF MealPrice >= 17.01 AND MealPrice <=25.00
Tip = MealPrice * 0.19
Step:6 IF MealPrice >= 25.01
Tip = MealPrice * 0.22
Step:6 Calculate Tax
Tax = MealPrice * 0.06
Step:7 Calculate Total
Total = MealPrice+tax+tip
Step:8 Print Total
END
===============================================================
KIndly CHeck and Verify Thanks..!!!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.