diff --git a/ch3/variables/Cargo.lock b/ch3/variables/Cargo.lock new file mode 100644 index 0000000..f26e54f --- /dev/null +++ b/ch3/variables/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "variables" +version = "0.1.0" diff --git a/ch3/variables/Cargo.toml b/ch3/variables/Cargo.toml new file mode 100644 index 0000000..c093eb6 --- /dev/null +++ b/ch3/variables/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "variables" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/ch3/variables/src/main.rs b/ch3/variables/src/main.rs new file mode 100644 index 0000000..a57709c --- /dev/null +++ b/ch3/variables/src/main.rs @@ -0,0 +1,6 @@ +fn main() { + let mut x = 5; + println!("The value of x is: {x}"); + x = 6; + println!("The value of x is: {x}"); +}