Write a function that returns the absolute value of an integer @n@.
Interface
C++ | int absolute(int n); |
C | int absolute(int n); |
Java | public static int absolute(int n); |
Haskell | absolute :: Int -> Int |
Python | absolute(n) # returns int |
absolute(n: int) -> int |
Observation You only need to submit the required procedure; your main program will be ignored.
Input/Output
Input/Output