Shop Discount (Baby Steps)

A shop gives ₹50 off when the bill is ₹500 or more. Given the price, print what the customer pays.

Input: One integer price (1 to 2000).

Output: One integer: the amount to pay.

Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.

Hint

  • Check price = 500.

More Baby Steps practice