Professional Documents
Culture Documents
Program N1
Program N1
file name:11.c
//*write a program to accept a number and check whether the number is odd or even*//
#include<stdio.h> //header file
main() //program execution begins
{
int no; //variables
printf("enter the no:");
scanf("%d",&no);
if(no%2==0) //if condition begins
{
printf("no.%d is even ",no);
}
else
{
printf("no.%d is odd ",no);
} //if condition ends
} //program ends
OUTPUT: