PROGRAM TO CHECK WHETHER GIVEN NUMBER IS EVEN OR ODD

/*PROGRAM TO CHECK WHETHER GIVEN NUMBER IS EVEN OR ODD*/

#include<stdio.h>

#include<conio.h>

void  main()

{

int n;

clrscr();

printf(“Enter any number: “);

scanf(“%d”,&n);

if(n%2==0)

printf(“Number %d is an even number”,n);

else

printf(“Number %d is an odd number”,n);

getch();

}

Leave a Reply

Your email address will not be published. Required fields are marked *