From 3935d097c8b7c110f92fe21918099b2ed61775e0 Mon Sep 17 00:00:00 2001 From: flykhan Date: Thu, 15 Jun 2023 12:52:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day4/d2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/day4/d2.cpp b/day4/d2.cpp index 058e619..e71d849 100644 --- a/day4/d2.cpp +++ b/day4/d2.cpp @@ -5,8 +5,8 @@ using namespace std; int main() { - cout << "12 = " << 12 << endl; // 结果:12 - cout << "ob01001 = " << bitset<5>(0b01001) << endl; // 结果:9, bitset<8>用于2进制形式输出 + cout << "12 = " << 12 << endl; // 结果: 12 + cout << "ob01001 = " << bitset<5>(0b01001) << endl; // 结果: 9, bitset<8>用于2进制形式输出 cout << "062 = " << 062 << endl; // 结果: 50 cout << "062 = " << oct << 062 << endl; // 结果: 50, oct 用于8进制形式输出 cout << "0x4f = " << hex << 0x4f << endl; // 结果: 79,hex 用于16进制形式输出