basic programming for beginners
i make programming easy....!
Monday, 21 May 2012
PROGRAM TO FIND OUT WEATHER THE INPUTTED NUMBER IS AN ODD OR EVEN NUMBER
#include<stdio.h>
#include<conio.h>
void main(){
int num;
clrscr();
printf("enter the value");
scanf("%d",&num);
if(num%2==0)
{printf("value is even",num);
}
else
{
printf("vlaue is odd",num);
}
}
Output:-
enter the value10
value is even
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment