mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-09 04:09:20 +00:00
12 lines
298 B
Rust
12 lines
298 B
Rust
// variables5.rs
|
|
// Make me compile! Execute the command `rustlings hint variables5` if you want a hint :)
|
|
|
|
|
|
|
|
fn main() {
|
|
let mut number = "T-H-R-E-E";
|
|
println!("Spell a Number : {}", number);
|
|
number = "3";
|
|
println!("Number plus two is : {}", number.parse::<i32>().unwrap() + 2);
|
|
}
|