Digital Generation is a computer shop that sells desktop pe, laptops, computer parts and accessories. The owner decided to give discount for a few items sold in the shop during its opening month. The discount is only eligible for purchase more than RM 250.00. Table 1 lists the items, price and discount offered. Table 1: List of items, price and discount Number Items Price (RM) Discount 10% 15% SSD Laserjet printer Mouse and mousepad USB drive Cooling pad 200.00 240.00 70.00 10% 4 25.00 5% 50.00 7% You are the programmer assigned to produce a sales record for the shop. Write a complete C program that calculates prices for items bought. The program should accept user's item number and the quantity. Then the program will determine and display item details, item price, discounted price, total price after discount and total savings for that purchase. Use if...else statements or switch statements and loop where it is appropriate and create a program with the following output. Sample program's output is as below, the numbers in bold/underline are example of user's input: Welcome to Digital Generation .................... Please enter choice: 1 Please enter the quantity: 2 Purchase Details 2/3 Item Number: 1 Quantity: 2 Price before discount: RM400.00 Discounted Price: RM40.00 Total Price After Discount: RM360.00 Thank you! Type 'y' to continue or 'n to stop: y Welcome to Digital Generation ............... Please enter choice: 4 Please enter the quantity: 12 Purchase Details Item Number: 4 Quantity: 12 Price before discount : RM300.00 Discounted Price: RM15.00 Total Price After Discount: RM285.00 Thank you! Type 'y' to continue or 'n' to stop: n

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Write a C program and draw a flowchart
Digital Generation is a computer shop that sells desktop pe, laptops, computer parts and accessories.
The owner decided to give discount for a few items sold in the shop during its opening month. The
discount is only eligible for purchase more than RM 250.00. Table 1 lists the items, price and
discount offered.
Table 1: List of items, price and discount
Number
Items
Price (RM)
Discount
10%
15%
SSD
200.00
Laserjet printer
Mouse and mousepad
2.
240.00
70.00
10%
4
USB drive
25.00
5%
7%
Cooling pad
50.00
You are the programmer assigned to produce a sales record for the shop. Write a complete C
program that calculates prices for items bought. The program should accept user's item number
and the quantity. Then the program will determine and display item details, item price, discounted
price, total price after discount and total savings for that purchase.
Use if...else statements or switch statements and loop where it is appropriate and create a program
with the following output.
Sample program's output is as below, the numbers in bold/underline are example of user's input:
Welcome to Digital Generation
....................
Please enter choice: 1
Please enter the quantity: 2
Purchase Details
2/3
Item Number: 1
Quantity: 2
Price before discount: RM400.00
Discounted Price: RM40.00
Total Price After Discount: RM360.00
Thank you!
Type 'y' to continue or 'n to stop: y
Welcome to Digital Generation
***..... *.....*
Please enter choice: 4
Please enter the quantity: 12
Purchase Details
Item Number: 4
Quantity: 12
Price before discount : RM300.00
Discounted Price: RM15.00
Total Frice After Discount: RM285.00
Thank you!
Type 'y' to continue or 'n' to stop: n
Transcribed Image Text:Digital Generation is a computer shop that sells desktop pe, laptops, computer parts and accessories. The owner decided to give discount for a few items sold in the shop during its opening month. The discount is only eligible for purchase more than RM 250.00. Table 1 lists the items, price and discount offered. Table 1: List of items, price and discount Number Items Price (RM) Discount 10% 15% SSD 200.00 Laserjet printer Mouse and mousepad 2. 240.00 70.00 10% 4 USB drive 25.00 5% 7% Cooling pad 50.00 You are the programmer assigned to produce a sales record for the shop. Write a complete C program that calculates prices for items bought. The program should accept user's item number and the quantity. Then the program will determine and display item details, item price, discounted price, total price after discount and total savings for that purchase. Use if...else statements or switch statements and loop where it is appropriate and create a program with the following output. Sample program's output is as below, the numbers in bold/underline are example of user's input: Welcome to Digital Generation .................... Please enter choice: 1 Please enter the quantity: 2 Purchase Details 2/3 Item Number: 1 Quantity: 2 Price before discount: RM400.00 Discounted Price: RM40.00 Total Price After Discount: RM360.00 Thank you! Type 'y' to continue or 'n to stop: y Welcome to Digital Generation ***..... *.....* Please enter choice: 4 Please enter the quantity: 12 Purchase Details Item Number: 4 Quantity: 12 Price before discount : RM300.00 Discounted Price: RM15.00 Total Frice After Discount: RM285.00 Thank you! Type 'y' to continue or 'n' to stop: n
Expert Solution
steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY