Auto AdSense

Tuesday 4 November 2014

C++ Program to Find out Number is Even or Odd

  #include <iostream.h>
   #include <conio.h>
   void main()
   {
     clrscr();
     int x;
     cout << "Enter an integer : ";
     cin>>x;
     if(x%2==0)
       cout << "The number " << x << " is even.";
     else
       cout << "The number " << x << " is odd.";
     getch();
   } 

No comments:

Post a Comment