Question: For this assignment, we ll create a simple bill calculator, similar to what s used in restaurants to determine the total amount to charge a

For this assignment, well create a simple bill calculator, similar to whats used in restaurants to
determine the total amount to charge a customer that adds tax and a tip to the subtotal. Use the
following requirements to complete the application:
1. Ask the user for the subtotal amount.
2. Ask the user for the tip percent, showing the value including the tax.
3. Calculate the total and print a breakdown to the user.
a. Use a constant value of 6% for the sales tax to calculate the tax.
b. Add the tax to the subtotal.
c. Calculate the tip amount by multiplying the tip percent by the amount in part b
d. Display the cost breakdown as shown below.
Example Program
Enter the subtotal amount:
21
Enter the tip percent for $22.26:
15
-------------------
Subtotal: $21.00
Tax 6%: $1.26
$22.26
Tip 15%: $3.34
-------------------
Total: $25.60//Ask the user for a subtotal amount
Console.WriteLine("please enter the subtotal amount:");
double subtotal = double.Parse(Console.ReadLine());
double subtotalWithTax = subtotal +(subtotal *(TAX /100));
//Ask the user for the tip percent, showing the value including the tax.
Console.WriteLine($"please enter a tip percent for {subtotalwithTax:C2}");
double tip = double.Parse(Console.ReadLine());
//Calculate the total and print a breakdown to the user.
Console.WriteLine($"{subtotal},{subtotalWithTax},{tip}, Tip Amount: {tip /100* subtotalwithTax:C2}");
/*
Enter the subtotal amount:
21
Enter the tip percent for $22.26:
15
Subtotal:
$21.00
Tax 6%: $1.26
$22.26
Tip 15%: $3.34
Total: $25.60
I am stuck in the provided picture
For this assignment, we ll create a simple bill

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!