Given an integer. If the number is positive, then print it; if negative - output the number multiplied by –1.
Input: a single number is entered from the keyboard
Output: display the number itself if it is positive, or the number multiplied by -1 otherwise
Input and output example
test number |
Input |
Output |
1 |
3 |
3 |
2 |
-3 |
3 |