#8 C Program to check whether a number is even or odd using ternary operator.

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

Post a Comment

0 Comments