From 4f6d9843b0772e8f419f4b01ec2b6a26b5fd7248 Mon Sep 17 00:00:00 2001 From: zeekling Date: Wed, 6 Oct 2021 14:49:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0bases.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chapter3/bases.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 chapter3/bases.c diff --git a/chapter3/bases.c b/chapter3/bases.c new file mode 100644 index 0000000..da4f1a8 --- /dev/null +++ b/chapter3/bases.c @@ -0,0 +1,9 @@ +#include + +int main(){ + int x = 100; + printf("dec = %d;octal = %o, hex = %x\n", x, x, x); + printf("dec = %d;octal = %#o, hex = %#x\n", x, x, x); + + return 0; +}