C Program to find whether given number is odd or even

#include
void main()
{
 int a;
 printf("enter no.\n");
 scanf("%d",&a);
 (a%2==0)?printf("even no.\n"):printf("odd no.\n");
}


Output:
C Program to find whether given number is odd or even using conditional operator

C Program to find whether given number is odd or even C Program to find whether given number is odd or even Reviewed by Prashant Sengar on December 23, 2017 Rating: 5

No comments:

Powered by Blogger.