# C program to checkoddor even usingConditional (Ternary) Operator

## C Program to check whether a given number is odd or even using Conditional (Ternary) Operator

This page has a C programs to check odd or even using Conditional (Ternary) Operator. This C program is to check odd or even using Conditional (Ternary) Operator. The Odd and Even numbers are in the Integer families. Even number can be divided by 2 and gives zero as remainder. The Even numbers examples are 0,2,4,6,8, . . .  When we divide the Odd number, the remainder will be one. The Odd number examples are 1,3,5,7,9,11,13, . . .  The below given C program is used to check whether a number is Odd or Even using Conditional (Ternary) Operator. Kindly check out the Odd or Even program using Conditional (Ternary) Operator. The odd or even program can be asked in different ways as (1). C Program to check Whether a Number is Even or Odd. (2). C program for checking odd or even number  (3). C program to check a Number is odd or even  (4). C Program to check whether the given Number is Even or Odd  (5). C Program to check if number is even or odd  (6). C Program to check if number is odd or even number  (7). C Program to check Odd or Even numbers  (8). C Program to check number is Even or Odd  (9). Program to find odd or even  (10).  Program to find a given number is odd or even  (11). Program to find a number is odd or even  (12). Program to find odd or even  (13).  Program to check odd or even.

### Program to Check whether a Number is Odd or Even using Conditional Operator

#include<stdio.h>
int main(){
int num,rem;
printf(" Enter an integer number: ");
scanf("%d",&num);
(num % 2)?printf("\n %d is an odd number.",num):printf("\n %d is an even number.",num);
getch();
return(0);
}

### Sample outputs:

Enter an integer number: 923

923 is an odd number.

Enter an integer number: 738

738 is an even number.