Skip to content
CampusEduX

Absolute Value (Ternary, No Math.abs)

Easyjava
Learn the Concept: Ternary Operator

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.

Related Problems

Input (stdin)

Output

Run your code to see output here...