// C program
#include<stdio.h>
void main()
{
int n;
clrscr();
printf("Enter the number:");
scanf("%d",&n);
if ((n%2)==0)
printf("\n The number is even.");
else
printf("\nThe number is odd.");
getch();
}
Sample Input/Output:
Enter the number:8
The number is even.
#include<stdio.h>
void main()
{
int n;
clrscr();
printf("Enter the number:");
scanf("%d",&n);
if ((n%2)==0)
printf("\n The number is even.");
else
printf("\nThe number is odd.");
getch();
}
Sample Input/Output:
Enter the number:8
The number is even.
No comments:
Post a Comment