rustlings/solutions/01_variables/variables4.rs
Denis-Cosmin NUTIU 06573e87ac initial commit
2024-10-28 22:46:17 +02:00

9 lines
234 B
Rust

fn main() {
// In Rust, variables are immutable by default.
// Adding the `mut` keyword after `let` makes the declared variable mutable.
let mut x = 3;
println!("Number {x}");
x = 5;
println!("Number {x}");
}