Hey, I'm not sure where this should go but this seems to be the right place
Can anybody tell me if there is a way to input n, which may be positive or negative, and get out n, which will be positive? I know that doesn't make perfect mathematical sense, but the general idea is:
If n is 5, I'll get 5 out
If n is -5, I'll get 5 out
Thanks in advance
use the absolute value function.
or more explicitly,
and it does make perfect mathematical sense. The absolute value function is a very important function in math