The Logical OR Operator


    #include<iostream.h>
void main ()
{
    int A , B , Y ;

        cout<<"A\t B\t Y\n";

        A = 0 ;
        B = 0 ;
        Y = A || B ;
        cout << A<<"\t"<<B<<"\t"<<Y<<endl;

        A = 0 ;
        B = 1 ;
        Y = A || B ;
        cout <<A<<"\t" << B<<"\t" <<Y<<endl ;

        A = 1 ;
        B = 0 ;
        Y = A || B ;
        cout <<A<<"\t" <<B<<"\t"<< Y<<endl;

        A = 1 ;
        B = 1 ;
        Y = A || B ;
        cout <<A<<"\t²<<B<<\t" <<Y<<endl ;
}

0 comments:

Post a Comment

 
 
 
 


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