Any integer is input through the keyboard. Write a program to determine whether it is an odd or even number.

#include<stdio.h>
void main()
{
	int num;
	printf("Enter a number=");
	scanf("%d",&num);
	if(num%2==0)
	printf("\n The number is even");
	else
	printf("\n The number is odd");
}

The output will be

Post a Comment (0)
Previous Post Next Post