Convert this to ternary operator :-
switch (n%2)
{
case 0: System.out.println ("Even");
break;
default : System.out.println ("Odd");
}
Answers
Answered by
1
Answer:
(n%2==0)?printf("Even"):printf("Odd");
Answered by
1
Answer:b=(n%2 == 0)?"Even":"Odd"
Explanation:
Similar questions
English,
5 months ago
World Languages,
5 months ago
Computer Science,
11 months ago
Math,
11 months ago
Math,
1 year ago
English,
1 year ago