Ad
  • Custom User Avatar

    It is not mandatory to handle negative numbers using a specific unary operator, there is a variety of ways to do it. And that numbers in the expression can be negative is clearly implied by Number may be both whole numbers and/or decimal numbers. The same goes for the returned result. Whole or decimal means they can be either positive, negative or zero. Handling properly - as a binary operator or as a sign of negative number is obviously part of the task. Moreover, I've just checked several languages and they all include fixed examples with negative numbers, I don't understand your last affirmation. Not a kata issue.