EVEN or ODD
c language code to check the number is even or odd:
#include<stdio.h>
#include<conio.h>
int main()
{int a;
printf("\nEnter any number: ");
scanf("%d",&a);
if(a%2==0)
{printf("\n%d is Even Number",a);
}
else
{printf("\n%d is Odd Number",a);
}
return 0;
}
---------------------------------------------------------------------------------------------
Output:
Enter any number:45
45 is Odd Number
Enter any number:80
80 is Even Number
Check the given number is even or odd
Reviewed by Amit Waghmare
on
January 04, 2019
Rating:
No comments: