mirror of
https://github.com/notohh/rustlings.git
synced 2024-12-18 15:08:08 -05:00
9 lines
234 B
Rust
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}");
|
|
}
|