E-commerce Checkout

Medium
#math #percentage

Input: `price` (number), `discount` (number). Return: Final price after discount.

Example

Input: 100, 10
Output: 90
Need a hint?
  • Calculate discount amount first, then subtract from price
Run your code to see output