Functions
Function-12
Function-13
Function-14
~/algor $ cat problems/funksiya-sonning-moduli
Absolute value
Easy
1000 ms
128 MB
24%
Write a function AbsValue(x) that returns the absolute value of the integer $x$.
Example 1: AbsValue(-7) → 7
Example 2: AbsValue(4) → 4
Write only the function body.
Input
One line with an integer $x$ — the argument of the function.
Output
The value returned by the function: an integer.
Note
$-10^{9} \le x \le 10^{9}$
Examples
Input #1
-7
Output #1
7
Input #2
4
Output #2
4