Using ternary operator If(x%2==0)
System.out.ptint("even");
else
System.out.print("odd");
Answers
Answered by
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