Delicious Digg Facebook Favorites More Stumbleupon Twitter

Monday 27 August 2012

program for even/odd number


                  Program for even/odd Number

           #include<stdio.h>
           main()
          {
              int a;
              clrscr();
              printf("enter the value of a:");
              scanf("%d",&a);
              if(a%2 == 0)
              printf(" even");
              else
              printf("odd");
              getch();
           }

         output :-

                  enter the value of a: 7
                  odd

0 comments:

Post a Comment