Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Prices and sales tax have to be constant and the output has to be the same as in the picture. IN C LANGUAGE Problem Statement:
Prices and sales tax have to be constant and the output has to be the same as in the picture. "IN C LANGUAGE"
Problem Statement: Write a program to calculate a customer's bill in the form of a receipt. Your company sells five different products: An HD TV, A Laptop Computer, an Xbox, an MP3 player and a 4G hot Spot. The unit prices are $232.40, $620.39, $230.21, $30.00, and $121.00 respectively. Your program should take the quantity sold of each item as input from the user, calculate the cost of the total gross sale and the amount of sales tax charged with a grand total. The state tax is 7.5%. These integers representing quantities must be input into the program in a user-friendly way; that is, the program must prompt the user for each quantity as shown below. The numbers in boldface show the user's answers. User Prompts with example input: How many HD Tv's were sold? 2 How many laptops were sold? 1 How many Xboxes were sold? 4 How many MP3 players were sold? 1 How many hot spots were sold? 2 Output Format Example: [n00006914@osprey p1]$ ./a.out, Enter in the number of HDTV's sold: 2 Enter in the number of laptop's sold: 1, Enter in the number of xbox's sold: 4 Enter in the number of mp3 player's sold: 1, Enter in the number of hot spot's sold: 2 QTY DESCRIPTION UNIT PRICE TOTAL PRICE 002 001 004 HDTV Lap. Cptr. XBox MP3 Player 4g Hot Spt 232.40 620.39 230.21 30.00 121.00 464.80 620.39 920.84 30.00 242.00 001 002 SUBTOTAL: TAX: TOTAL: 2278.03 170.85 2448.88 [n00006914@osprey p1]$ Figure 1 Example of prompting and output of programStep 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