Skip to content
C

Absolute Value (Ternary, No Math.abs)

Easyjava

Read an integer and print its absolute value using a ternary expression — do not use Math.abs.

Input: one integer.

Output: one line — the absolute value.

Input (stdin)

Output

Run your code to see output here...