CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Even or Odd With a Ternary

C# code walkthrough · Question 30
easyOperators

Code

Read carefully. What does this print?
1int x = 10;
2string s = x % 2 == 0 ? "even" : "odd";
3Console.WriteLine(s);

Your answer