Problem

Return -1 if n<0, 0 if n==0, else 1.

Examples

  • sign(-3) -> -1
  • sign(0) -> 0
  • sign(2) -> 1
Compile and test (Ctrl+Enter)