Files
rustlings/solutions/01_variables/variables4.rs
T

10 lines
234 B
Rust
Raw Normal View History

2026-07-19 17:01:21 -07:00
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}");
}