variables4.rs (234B)
1 fn main() { 2 // In Rust, variables are immutable by default. 3 // Adding the `mut` keyword after `let` makes the declared variable mutable. 4 let mut x = 3; 5 println!("Number {x}"); 6 7 x = 5; 8 println!("Number {x}"); 9 }
rustlingssolving rustlings ft. dracuxan | |
| git clone [email protected]:dracuxan/rustlings.git | |
| Log | Files | Refs |