Input
Output
Sample Input
Sample Output
Test Yourself
Problem Statement
You need to create a function absolute which computes the absolute value of a given number.
Input
The input of the function is a number x of type Double whose absolute value you want to compute.
Output
The output will be the absolute value of x.
Sample Input
-5
Sample Output
5
Test Yourself#
Write your code in the given area. Try the exercise by yourself first, but if you get stuck, the solution has been provided. Good luck!