Add flexibility to pricing with a "discount" variable. The discount variable will take value of variable "rate" and adjust the value by the variable "discount" percent. So if the variable "discount" is -5 and the value of rate is 100, calling function "applyDiscount" changes the variable "rate" to 95. "applyDiscount" should also work with positive numbers. For example, if "discount" is 5, then "applyDiscount would return 105.
Add variable "discount"
Add function "applyDiscount"
Add flexibility to pricing with a "discount" variable. The discount variable will take value of variable "rate" and adjust the value by the variable "discount" percent. So if the variable "discount" is -5 and the value of rate is 100, calling function "applyDiscount" changes the variable "rate" to 95. "applyDiscount" should also work with positive numbers. For example, if "discount" is 5, then "applyDiscount would return 105.