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 discount amount in dollars.
Example:
For example, if price was 150 and discount was 10, the answer would be 15.
Why? Because the discount is 10%. And 10% of 150 dollars is 15 dollars.
Free plan: 30 tutor messages. Premium is unlimited.
Saved
Ctrl + Enter to check