free c programming course
Sunday, 14 December 2008
Program to find whether a number is odd or even
#include
int main()
{
int number ;
printf("Enter a whole number\n");
scanf("%d",&number);
if(number % 2 == 0)
printf("number is even.\n");
else
printf("number is odd.\n");
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment