Write a program to input a number to check and display whether it is an odd number or even number.
Answers
Answered by
0
Answer:
hope it helps
Explanation:
Example 1: Check Whether Number is Even or Odd using if else
Enter an integer: 23 23 is odd. In this program, if..else statement is used to check whether n%2 == 0 is true or not. If this expression is true, n is even if not n is odd. You can also use ternary operators ?: instead of if..else statement.
Answered by
0
Answer:
Your answer is in the attachment.
Attachments:
Similar questions