修改字符

This commit is contained in:
flykhan 2023-06-15 12:52:21 +08:00
parent ee5c71e2f6
commit 3935d097c8
1 changed files with 2 additions and 2 deletions

View File

@ -5,8 +5,8 @@ using namespace std;
int main() int main()
{ {
cout << "12 = " << 12 << endl; // 结果12 cout << "12 = " << 12 << endl; // 结果: 12
cout << "ob01001 = " << bitset<5>(0b01001) << endl; // 结果9, bitset<8>用于2进制形式输出 cout << "ob01001 = " << bitset<5>(0b01001) << endl; // 结果: 9, bitset<8>用于2进制形式输出
cout << "062 = " << 062 << endl; // 结果: 50 cout << "062 = " << 062 << endl; // 结果: 50
cout << "062 = " << oct << 062 << endl; // 结果: 50, oct 用于8进制形式输出 cout << "062 = " << oct << 062 << endl; // 结果: 50, oct 用于8进制形式输出
cout << "0x4f = " << hex << 0x4f << endl; // 结果: 79hex 用于16进制形式输出 cout << "0x4f = " << hex << 0x4f << endl; // 结果: 79hex 用于16进制形式输出