diff --git a/Rust/variables.rs b/Rust/variables.rs new file mode 100644 index 0000000..51ca4ed --- /dev/null +++ b/Rust/variables.rs @@ -0,0 +1,13 @@ +fn main() { + let mut x = 5; + println!("The value of x is: {x}"); + x = 6; + println!("The value of x is: {x}"); + const SECONDS_IN_HOUR: u32 = 60 * 60; + println!("Nuber of seconds is: {SECONDS_IN_HOUR}"); + { + let x = x + 1; + println!("X in the scope {x}"); + } + println!("The value of x is: {x}"); +}