Computer Science, asked by namazzisalmah1485, 9 months ago

Using ternary operator If(x%2==0)
System.out.ptint("even");
else
System.out.print("odd");

Answers

Answered by riddhidebbasu
7

Explanation:

String s = "";

s = (x%2==0) ?( "even") : ("odd");

System.out.print(s);

please mark my answer brainliest if you liked it

Similar questions