Exercise: Discounted Price
Let's make a price discounting system!
We'll cover the following
Problem Statement
In this challenge, you must discount a price according to its value.
-
If the price is
300
or above, there will be a30%
discount. -
If the price is between
200
and300
(200
inclusive), there will be a20%
discount. -
If the price is between
100
and200
(100
inclusive), there will be a10%
discount. -
If the price is less than
100
, there will be a5%
discount. -
If the price is negative, there will be no discount.
Get hands-on with 1200+ tech skills courses.