Logical Operators


    # include <iostream.h>
    void main ()
    {
        int a = 2 , b = 7 ;
        cout<<((a<b)&&(b!=0))<<endl ;
        cout<<((a>b)&&(b>=0))<<endl ;
        cout<<((a==b)||(b>0))<<endl ;
        cout<<((a!= 0)||(a>0))<<endl ;
        cout<< !(a>0)<<endl ;
    }

0 comments:

Post a Comment

 
 
 
 


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