Program to find Even and Odd number


     # include <iostream.h>
     int main( )
     {
    int x, y ;
    cout<<"\n Enter Number : " ;
    cin>>x;
    cout<<"\n The Number is : " <<x;

    y = x % 2 ;
    y == 0 ? cout<<" Number is Even ." : cout<<" Number is Odd .";
    return 0;
      }

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|