Friday, 20 March 2015

Even and Odd Number in C



 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#include<stdio.h>
void main()
{
 int n;
 printf("Please enter any number: ");
 scanf("%d", &n);
  if(n%2==0)
  {
   printf("It's an even number ");
  }
  else
  {
   printf("it's an odd number");
  }
  printf("\n");
}

0 comments:

Post a Comment

 

Subscribe to our Newsletter

Contact our Support

Through the contact form

Our Team Memebers