Functions
Function-13
Function-14
Function-15
~/algor $ cat problems/funksiya-ishora
Sign of a number
Easy
1000 ms
128 MB
24%
Write a function Sign(x) that returns $1$ if the integer $x$ is positive, $0$ if it is zero and $-1$ if it is negative.
Example 1: Sign(5) → 1
Example 2: Sign(-3) → -1
Write only the function body.
Input
One line with an integer $x$ — the argument of the function.
Output
The value returned by the function: $1$, $0$ or $-1$.
Note
$-10^{9} \le x \le 10^{9}$
Examples
Input #1
5
Output #1
1
Input #2
-3
Output #2
-1