Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need to write a C code. Problem Statement: Write a program to create a customer's bill for a company. The company sells only five
I need to write a C code.
Problem Statement: Write a program to create a customer's bill for a company. The company sells only five different products: TV, VCR, Remote Controller, CD player, and Tape Recorder. The unit prices are S400.00, S220, S35.20, S300.00, and SI 50.00 respectively. The program must read the quantity of each piece of equipment purchased from the keyboard. It then calculates the cost of each item, the subtotal, and the total cost after an 8.25% sales tax. The input data consist of a set of integers representing the quantities of each item sold. These integers must be input into the program n a user-triendly way; that is, the program must prompt the user tor each quantity as shown below. The numbers in boldface show the user's answers. How Many TVs Were Sold? 3 How Many VCRs Were Sold?5 How Many Remote Controllers Were Sold? 1 How Many CDs Were Sold? 2 How Many Tape Recorders Were Sold?4 Output Format Example OTY DESCRIPTION UNIT PRICE TOTAL PRICE TV VCR REMOTE CTRLR CD PLAYER TAPE RECORDER 400.00 220.00 35.20 300.00 150.00 XxK XXXK.XX SUBTOTAL TAX TOTAL Test data: Use either defined constants or memory constants for the unit prices and the tax rate. Use integer variables to store the quantities for each item. Use floating-point variables to store the total price for each item, the bill subtotal, the tax amount, and the total amount of the bill. Run your program twice with the following data: Set 1> 21412 Set 2> 3 0 20 21Step 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