Thursday, 12 January 2012

w.a.p to print no is even or odd.

#include<stdio.h>
#include<conio.h>
void main()
{
     // print no is even or odd
      int a;
       printf("enter number::\n");
       scanf("%d",&a);
       if (a%2==0)
      {
          printf("no. is even\n);
      }
       else
       {
           printf("no. is odd\n");
       }
        getch();
}
out put:-
enter number::
2
no is even

No comments:

Post a Comment