question answers
Saturday, June 29, 2013
Write a C program to check odd or even.
#include<stdio.h>
void main()
{
int n;
printf("Enter an integer
\n
");
scanf("%d",&n);
if ( n%2 == 0 )
printf("Even");
else
printf("Odd");
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment