# include <iostream.h>
void main ()
{
int m = 82, n = 26;
cout<<m<<" << 2"<<" = "<<(m<<2)<<endl;
cout<<m<<" >> 2"<<" = "<<(m>>2)<<endl;
cout<<m<<" & "<<n<<" = "<<(m&n)<<endl;
cout<<m<<" | "<<n<<" = "<<(m|n)<<endl;
cout<<m<<" ^ "<<n<<" = "<<(m^n)<<endl;
cout<<"~"<<m<<" = "<<~m<endl;
}
output
82 << 2 = 328
82 >> 2 = 20
82 & 26 = 18
82 | 26 = 90
82 ^ 26 = 72
~82 = -83
Friday, 13 January 2012
CPP
0 Response to "contoh 13"
Post a Comment