We created two variables to store the original price of a product in dollars and the discount percentage applied to that price.
Use these two variables and arithmetic operations to compute and print the price after the discount.
Example:
For example, if price was 150 and discount was 10, the answer would be 135.
Why? Because the discount is 10%. 10% of 150 dollars is 15 dollars. And 150 - 15 dollars is 135 dollars.
Free plan: 30 tutor messages. Premium is unlimited.
Saved
Ctrl + Enter to check