Pages

Tuesday, 2 September 2014

program for checking even or odd


// Code is given below

#include<iostream>
using namespace std;
int main()
{
      int a ;
      cout<<" enter a number = ";
      cin>> a;
      if ( a % 2 == 0 )
      {
      cout<<" number is even\n\n\n";
      }
      else
      {
      cout<<"number is odd\n\n\n ";
      }
return 0;
}


No comments:

Post a Comment

thnx for visiting my blog