an ecommerce company plans to give their customers a discount for the new year. the discount will be calculated on the basis of the bill amount is the product of the sum of all odd digits and the sum of even digits of the customer's total bill. if no odd-even digit is represented in the bill amount then 0 will be returned?
If you look at this system for calculating the discount, you can easily understand that it is not fair. Since a client who has spent less money has a real chance to get a more profitable discount than one who has spent much more. For example, one person spent 98 dollars - a discount of 72, the other spent 1002 - a discount of 2 dollars. Following from this, we can say that the distribution of discounts is random and may not be favorable for some customers and they will not receive anything if their account does not comply with the necessary conditions. In this situation, the simultaneous presence of odd and even numbers.
Comments
Leave a comment