3968: 位操作计算题2

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Special Judger Creator:
Submit:14 Solved:9

Description

#include<bits/stdc++.h>
using namespace std;
int main()
{
int a = 148;
    int b = 84; 
 
  cout<<(a&b)<<endl;//第一个输出
cout<<(a|b)<<endl;//第二个输出
cout<<(a^b)<<endl;//第三个输出
cout<<~a<<endl; //第四个输出
cout<<(a<<2)<<" ";//第五个输出

cout<<(a>>1)<<endl; //接第五个输出

return 0;

}

Input

Output

程序运行的输出答案

Sample Input Copy

5

Sample Output Copy