#include<stdio.h>
#include<conio.h>
void main()
{
int no;
clrscr();
printf("Enter a number");
scanf("%d",&no);
if(no%2==0)
{
printf("Even number");
}
else
{
printf("Odd number");
}
getch();
}
#include<conio.h>
void main()
{
int no;
clrscr();
printf("Enter a number");
scanf("%d",&no);
if(no%2==0)
{
printf("Even number");
}
else
{
printf("Odd number");
}
getch();
}
hi,, it is also good but i just find a little different...... write a C++ program to accept a four digit number and print whether it it an odd or even number??
ReplyDelete.
.
can you help me to solve this...?
In my blog I am trying to describe all the codes in an innovative way. You guys can have a look.
ReplyDeletehttp://cprogramminglibrary.blogspot.com/2018/04/even-or-odd.html