In what concerns the continuous evaluation solving exercises grade during the semester, you should submit until 23:59 of March 10th
(this exercise will still be available for submission after that deadline, but without couting towards your grade)
[to understand the context of this problem, you should read the class #02 exercise sheet]
In mathematics, the absolute value of a number is its distance from zero on the number line, regardless of its sign. Can you write a program that calculates the absolute value of a given number?
Write a program that, given an integer number N, prints its absolute value.
The input consists of line with single integer number N.
The output should be a single line displaying the absolute value of N.
The following limits are guaranteed in all the test cases that will be given to your program:
1 000 000 ≤ N ≤ 1 000 000 | The input number |
Example Input 1 | Example Output 1 |
-37 |
37 |
Example Input 2 | Example Output 2 |
42 |
42 |