Program:
#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("Enter any Number : ");
scanf("%d", &n);
n%2==0 ? printf("Given Number is Even") : printf("Given Number is Odd ");
getch();
}
Output:
Enter any Number : 2
Given Number is Even
No comments:
Post a Comment