From 36920adbaa85bd1be5ad37d7a22212231179930f Mon Sep 17 00:00:00 2001 From: garhve Date: Thu, 22 Dec 2022 18:03:28 +0800 Subject: finish chapter 3 --- .../chapter-3-variables-and-mutability/variables/src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 rust/theBook/chapter-3-variables-and-mutability/variables/src/main.rs (limited to 'rust/theBook/chapter-3-variables-and-mutability/variables/src/main.rs') diff --git a/rust/theBook/chapter-3-variables-and-mutability/variables/src/main.rs b/rust/theBook/chapter-3-variables-and-mutability/variables/src/main.rs new file mode 100644 index 0000000..ecaf28f --- /dev/null +++ b/rust/theBook/chapter-3-variables-and-mutability/variables/src/main.rs @@ -0,0 +1,7 @@ +fn main() { + let mut x = 5; + println!("The value of x = {x}"); + + x = 6; + println!("The value of x = {x}"); +} -- cgit v1.2.3-70-g09d2