Write a C++ program that will compute and display the points earned by the customer based on his loyalty card type and total purchase amount.
Grand Supermarket is a one-stop shop store where customers could buy food, grocery items, appliances, wares, apparels and furniture. Customers can avail of a loyalty card and they can earn points on each purchase. The points earned are based on the customer’s type of card and the total purchase amount as shown in the table below.
Type of Loyalty Card |
Total Purchases (in Pesos) |
Points Earned |
Regular |
Less than 1000 1000 – 1999.99 2000 and above |
3% of the total purchases 6% of the total purchases 10% of the total purchases |
Deluxe |
Less than 2000 2000 and above |
7% of the total purchases 12% of the total purchases |
Premium |
Less than 2500 2500 and above |
5% of the total purchases 14% of the total purchases |
- Write a C++ program that will compute and display the points earned by the customer based on his loyalty card type and total purchase amount.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images