Computer Science, asked by nallarithvika, 3 months ago

Rewrite the following using ternary operator.
if( x%2==0)
System. out. println ("Even");
else
System. out. println ("odd");​

Attachments:

Answers

Answered by jai696
5

\large\mathsf\color{pink}{Solution\: using\: Java}

System.out.println(x % 2 == 0 ? "Even": "Odd");

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions