CJCoding With Joseph

Absolute Value

Read an integer n from input and print its absolute value (the non-negative version). If n is negative, print -n; otherwise print n. For example, for input -7, print:

7

Expected Output:

7
Topics:
If Statements
๐Ÿ“ฅ Auto-Input:
-7
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.