Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A local department store hires you to write an automated checkout program to exp

ID: 2365737 • Letter: A

Question

A local department store hires you to write an automated checkout program to expedite customers in a hurry. The checkout line can only accept five items for any one purchase. Design a program that asks for the price of each item, and then displays the subtotal of the sale, the amount of the sales tax and the total. The sales tax is 6 percent.

Explanation / Answer

#include using namespace std; int main(void) { //declarations double item1 = 0; double item2 = 0; double item3 = 0; double item4 = 0; double item5 = 0; double subtotal = 0; double total = 0; double tax = 0; //Enter Items cout > item1; cout > item2; cout > item3; cout > item4; cout > item5; //Compute subtotal subtotal = (item1 + item2 + item3 + item4 + item5 + item6); //Compute amount of tax tax = subtotal * (.06); //Compute total total = subtotal + tax; //Display subtotal, total, and amount of tax cout < " The subtotal of the sale is: "
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote