mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-04-22 13:38:04 +08:00
13 lines
189 B
Rust
13 lines
189 B
Rust
fn main() {
|
|
let x = 5;
|
|
|
|
let x = x + 1;
|
|
|
|
{
|
|
let x = x * 2;
|
|
println!("The value of x in the inner scope is: {x}");
|
|
}
|
|
|
|
println!("The value of x is: {x}");
|
|
}
|