Lab Function Question
Lab Function Question
The online souvenir shop offers the variety of souvenir such as postcards, key
chains, refrigerator magnets, stickers, mugs, plates and etc. The following table depicts the
hot selling products for this online shop:
a. Write a complete C++ function that can perform the following problems:
This function received the addresses of the category code, product code and quantity
from the function call.
Both functions above will be called repeatedly until the loop reach the number of
category.
Enter Category : A
Enter Product Code : 11-076
Enter Quantity : 3
Amount : RM 9.00
Enter Category : A
Enter Product Code : 12-111
Enter Quantity : 4
Total Amount : RM 10.00
QUESTION 2
WebUiTM offers 3 comprehensive cost of digital marketing services. Currently, WebUiTM
has 5 customers. 10% off the total payment is given to a customer who purchased a
service for more than one year. The following table shows the type, code and price for
each service.
Write a complete C++ program to calculate the payment of each customer, the total
payment for each type of service (before discount), the service with the highest total
payment (before discount) and the total payment for all 5 customers.
The following functions must be used in your solutions.
The sample of input and output for the program is based on the following figure.