017. Write a program to accept a number from user and print if it is even or odd in C language

#include<stdio.h>
#include<conio.h>
main()
{
 int n;
 clrscr();
 printf("Enter number...");
 scanf("%d",&n);
 if(n%2==0)
	printf("Number is even...");
 else
	printf("Number is odd....");
 getch();
}

Leave a Reply

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