C program to check wheather a number is odd or even using conditional operator
#include<stdio.h> main() { int n; printf("Input an integer : "); scanf("%d",&n); n%2 == 0 ? printf("Even\n") : printf("Odd\n"); return 0; }
/*
Output : #1
Input an integer : 5Odd
Output : #2
Input an integer : 4Even
*/