This is a simple program to check whether a number is even or odd. In this Program, I have used the ternary
operator to check the number. You can also use the if - else statement for better understanding, which adds 2-3 lines of code. I
have used the ternary operator to minimize the code.
Here is the output
0 Comments