Question: C programming QUESTION 2 Given: struct order { char productID[6]; float unitPrice, grossTotal, netTotal, service Tax; int qtyOrdered; The system requirements are: 0 Declare constant
![C programming QUESTION 2 Given: struct order { char productID[6]; float](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f45ef89555a_12866f45ef80d4bc.jpg)
C programming
QUESTION 2 Given: struct order { char productID[6]; float unitPrice, grossTotal, netTotal, service Tax; int qtyOrdered; The system requirements are: 0 Declare constant TAX, initialised to 0.08. In main Declare array myOrder of type struct order, set to size 50. 0 Prompt the user to enter the member of orders for the day. Call function getInput(...), passing in array myOrder and mumber of orders as parameters. Call function processOrder(...), passing in array myOrder and number of orders as parameters. In getInput(...): o Get all required inputs (refer to sample output screen). In processOrder(...): Calculate and display all the required outputs (refer to sample output screen). Note: Figure out and use the correct formulas required. Continued... Sample output screen ORDER PROCESSING . ========EEEEEE How many orders today? 3 Enter product ID Enter unit price Enter quantity ordered : P1881 RM 25.5 : 2 Enter product ID Enter unit price Enter quantity ordered : Piee2 : RM 30 : 4 Enter product ID Enter unit price Enter quantity ordered : P1803 : RM 16.5 : 3 ORDER Unit Price Qty Ordered Gro55 Revenue Service Tax :: Net Revenue : P1001 : RM 25.50 : 2 : RM 51.99 : RM 4.08 : RM 46.92 ORDER Unit Price oty Ordered Gross Revenue Service Tax :: Net Revenue : P1002 : RM 30.00 : 4 : RM 120.00 : RM 9.60 : RM 110.40 ORDER Unit Price Qty Ordered Gross Revenue Service Tax :: Net Revenue : P1003 : RM 16.50 :3 : RM 49.50 : RM 3.96 - RM 45.54 *TOTAL INCOME EARN :: RM 202.86 (a) Design the program using a problem analysis chart. (10 marks) (6) Design the program using a flowchart, (10 marks) (c) Write the complete C program (20 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
