rustlings/exercises/01_variables/variables5.rs

10 lines
318 B
Rust

fn main() {
let mut number = "T-H-R-E-E"; // Don't change this line
println!("Spell a number: {number}");
// TODO: Fix the compiler error by changing the line below without renaming the variable.
number = "3";
let n :i32 = number.parse().unwrap();
println!("Number plus two is: {}", n + 2);
}