rewrite the following using ternary operator
If (x%2==0)
System.out.println("even");
else
System.out.println("odd");
please answer correctly
Answers
Answered by
0
Answer:
i cant understand your question , sorry.
Explanation:
plz follow me , and like my answer , and mark my answer as a brainlyist.
Answered by
1
Answer:-
Using ternary operator, we can write like this.
System.out.println((x%2==0)?"Even":"Odd");
Similar questions