C Program to Check Number is Odd or Even

 

C Program to Check Number is Odd or Even



/*****************************************
C program to check  number is odd or even. Take user input
************************************************************/
#include<stdio.h>
#include<conio.h>
void main()
{
int number;
printf("\t\t***Output***\n");
printf("Enter any number\n");
scanf("%d",&number);
if(number%2==0)
{
printf("The number i.e., %d is even\n",number);

}
else
{
printf("The number i.e.,%d is odd\n",number);
}
printf("End of program");
}


***Output***

Enter any number

99

The number i.e.,99 is odd

End of program

टिप्पणी पोस्ट करा

0 टिप्पण्या