Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CIS 1 1 5 ch 0 2 _ lab 0 2 Complete the program below, using onlineGDB, to calculate the total cost of a meal
CIS chlab
Complete the program below, using onlineGDB, to calculate the total cost of a meal including sales tax and a tip.
The program will prompt the user to input:
the cost of the meal,
the tip percent
then perform the calculations and print the results.
Sales tax rate is do not calculate a tip on sales tax amount.
Sample output below:
please input the amount of the meal
enter tip percent as shown your number can be different
please input the tip percent for the meal
Meal cost is
Tax amount is
Tip amount is
Total meal cost is
copy program below this line
# student name SP chlab
this program will accept input of a meal cost and then:
calculate the sales amount
calculate the tip amount
print the results to include: meal amount, tip amount, tax amount, total cost
# program constants
TAXRATE
# data input
mealAmtfloatinputplease input the amount of the meal
# calculations
taxAmtmealAmt TAXRATE
# print results
printfmeal cost is mealAmt: f
printftax amount is taxAmt: f
printftip amount is tipAmt: f
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started