From 30bd068d05e8a79b965450a6e3b6bce6b6c16156 Mon Sep 17 00:00:00 2001 From: flykhan Date: Mon, 19 Jun 2023 11:45:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E4=BD=8D=E5=8F=96=E5=8F=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day6/d1.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 day6/d1.cpp diff --git a/day6/d1.cpp b/day6/d1.cpp new file mode 100644 index 0000000..cb751b5 --- /dev/null +++ b/day6/d1.cpp @@ -0,0 +1,14 @@ +// 按位取反 +#include + +using namespace std; + +int main() +{ + int n = 10; + cout << "~10 = " << ~n << endl; // 取反 + n = -9; + cout << "~-9 = " << ~n << endl; // 取反 + + return 0; +}