February 4, 2011

C Program To find whether a Number is Even or Odd using Conditional Operator


//C Program To find whether a Number is Even or Odd using Conditional Operator
#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("Enter any Number\n\n");
scanf("%d",&n);
(n%2==0)?printf("\nEven Number"):printf("\nOdd Number");
getch();
}

Hope you liked my posts, give comments if you have any doubts.. :)

Related Posts :



Categories:

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Related Posts with Thumbnails