33 lines
648 B
C
33 lines
648 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <time.h>
|
|
#include <math.h>
|
|
#include <stdbool.h>
|
|
#include <string.h>
|
|
#ifdef _WIN32
|
|
#include <windows.h>
|
|
#include <direct.h>
|
|
#endif
|
|
|
|
// !移位运算
|
|
/*
|
|
1.C有这些按位运算的运算符:
|
|
.& 按位的与
|
|
.1 按位的或
|
|
.~ 按位取反
|
|
.^ 按位的异或
|
|
.<< 左移
|
|
.>> 右移
|
|
*/
|
|
|
|
int main()
|
|
{
|
|
// 设置控制台编码为UTF-8
|
|
#ifdef _WIN32
|
|
system("chcp 65001 > nul"); // 设置控制台编码为UTF-8
|
|
SetConsoleOutputCP(65001); // 设置控制台输出编码
|
|
SetConsoleCP(65001); // 设置控制台输入编码
|
|
#endif
|
|
|
|
return 0;
|
|
} |