Page 1 of 1

Write a CH program to perform sales transaction. The program consists of the following functions: a) netPrice - This fun

Posted: Wed Apr 27, 2022 3:12 pm
by answerhappygod
Write A Ch Program To Perform Sales Transaction The Program Consists Of The Following Functions A Netprice This Fun 1
Write A Ch Program To Perform Sales Transaction The Program Consists Of The Following Functions A Netprice This Fun 1 (64.79 KiB) Viewed 42 times
Write a CH program to perform sales transaction. The program consists of the following functions: a) netPrice - This function should ask the user to enter the count of book purchased, calculate the total of purchase and then returns that value as a double. The book price is as follows: (4marks) Book Title Book Price Calculus Computer Science Biology RM280 RM180 RM250 b) membership Voucher - This function should ask the user to enter their membership status as follows and then returns the voucher redeem value as a double. (Smarks) Membership Status Voucher Redeem Gold RMSO Silver RM30 Non-Member RM10 c) totalPrice - This function should accept the netPrice and membership Voucher. Later calculate the total price after discount (use the discount rate in the table below) and the voucher value for redemption (4marks) Total Price = netPrice - discount (%) -membership Voucher Net Price - Item Purchased Below or equal to RM200 RM201 - RM500 RM500 above Discount (%) 5% 10% 20% d) displayData - This function should accept netPrice, membership Voucher and totalPrice as arguments, and display them in an appropriate message on the screen. (4marks) main - This function consists of calls to the above functions. (3marks)