#include <iostream.h>
void main ()
{
int a = 4 , b = 7 ;
int x ;
x = a << 1 ;
cout<<"Number="<<a<<endl ;
cout<< "Single Left Shift = "<<x<<endl ;
x = a >> 1 ;
cout <<"Single Right Shift = "<<x<<endl ;
x = b << 1 ;
cout<<"Number ="<<x<<endl;
cout<<"Single Left Shift = "<<x<<endl ;
x = b >> 1 ;
cout<<"Single Right Shift = "<<x<<endl ;
}
0 comments:
Post a Comment