5.8k views
2 votes
Write the definition of a function absoluteValue, that receives an integer parameter and returns the absolute value of the parameter's value. So, if the parameter's value is 7 or 803 or 141 the function returns 7, 803 or 141 respectively. But if the parameter's value is -22 or -57, the function returns 22 or 57 (same magnitude but a positive instead of a negative). And if the parameter's value is 0, the function returns 0.

User Mattmac
by
6.8k points

1 Answer

0 votes

Answer:

Explanation:

The value absolute is the function
|*|: \mathbb{R}\rightarrow \mathbb{R}^+ defined by
|x|= x if
x is a positive number and
|x|=-x if
x is a negative number.

User Ishmel
by
5.8k points