Bakery Sales
A bakery sells wholemeal breads, sweets and cakes. To encourage sales, the director announced prizes based on the number of products sold during the week, following a point system: each loaf of bread (b) is worth 1 point, each sweets pack (s) is worth 2 points and each cake (c) is worth 3 points. Depending on the total points accumulated, employees may receive a different reward. The challenge is to create a program that determines which award employees will receive based on the quantity of each product sold.
If the sum of the points of all products sold in the week is equal to or greater than 150, each employee receives a cake ("C") as a prize; otherwise, if the sum of the points is greater than or equal to 120, each employee receives a sweets pack ("S") as a prize; otherwise, if the sum of the points is greater than or equal to 100, each employee receives a loaf of bread ("B") as a prize. If the sum of the points is less than 100, there is no award ("N") for the employees.
The challenge is to create...