Skip to content

Commit

Permalink
add variables file
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphonseMehounme committed Nov 25, 2024
1 parent cb99551 commit 5ad4d0c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Rust/variables.rs
Original file line number Diff line number Diff line change
@@ -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}");
}

0 comments on commit 5ad4d0c

Please sign in to comment.