#include <iostream>
#include <string>
#include <Windows.h>
using namespace std;
int main(void){
int x;
//把整数的最低四位设置为0110
cout << "请输入一个整数:" << endl;
cin >> x;
//1、先把最后四位变为0000
x = x & ~15;
//2、结果与0110进行 | 运算 也就是 x | 6
x = x | 6;
cout << "结果为:" << x << endl;
system("pause");
return 0;
}
491

被折叠的 条评论
为什么被折叠?



