Lulu Hypermarket wants you to create a program that they can use to compute for the discounts to be given to Lulu card holders. The program should read the user to enter the name of the customer and the number of purchases. The number of purchases will serve as the counter for the number of times purchase amount will be entered by the user. The program should be able to count the number of purchase amounts in each of the following ranges: • 1 to 30 • Above 30 The program should also compute the sum of all the purchase amounts. A discount is computed based on the sum of the purchase amount. If the sum of the purchase is more than 500, the dis

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter4: Control Structures I (selection)
Section: Chapter Questions
Problem 19PE: Ron bought several acres of farm to grow and sell vegetables. Suppose that Ron wants to grow a...
icon
Related questions
Question
1. Lulu Hypermarket wants you to create a program that they can use to compute for the discounts to be given to Lulu card holders. The program should read the user to enter the name of the customer and the number of purchases. The number of purchases will serve as the counter for the number of times purchase amount will be entered by the user. The program should be able to count the number of purchase amounts in each of the following ranges: • 1 to 30 • Above 30 The program should also compute the sum of all the purchase amounts. A discount is computed based on the sum of the purchase amount. If the sum of the purchase is more than 500, the discount is 2.5% of the sum; otherwise, the discount is 5% of the sum. Display an appropriate output. Python 3
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning