Question: Using C#, create an application that determines the total due on purchases including sales tax and shipping charges. Allow the user to input any number
Using C#, create an application that determines the total due on purchases including sales tax and shipping charges. Allow the user to input any number of item prices. Use a do-while loop such that in the first iteration, you ask the user to enter the price for an item. Keep a counter variable to track the number of items the user has entered by incrementing its value at every iteration. As the last statement for the do{} construct, ask the user if they wish to enter more item prices. Re-execute the do-while loop if the user enters yes.
Shipping charges are determined based on the number of items purchased using the following chart (if necessary, use if/else statements for making this decision).
Fewer than 3 items $3.50
3 to 6 items $5.00
7 to 10 items $7.00
11 to 15 items $9.00
More than 15 items $10.00
In addition to the above, if the total purchase (before adding sales tax) is $100.00 or more, then provide free shipping. If the user is $10.00 or less away from reaching a total purchase of $100.00, then display a message prompting the user that they are that many dollars away from free shipping. This should be implemented in a way that allows the user to continue entering items if they are close to free shipping.
Sales tax of 7.75% is charged against the total purchase. Display an itemized summary to the user with the following information. Total purchase charge, number of items purchased, sales tax amount, shipping charge, and the grand total. Use proper format specifiers if necessary.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
