mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-05 17:53:29 +02:00
progress variables
This commit is contained in:
@@ -3,6 +3,6 @@ fn main() {
|
||||
println!("Spell a number: {number}");
|
||||
|
||||
// TODO: Fix the compiler error by changing the line below without renaming the variable.
|
||||
number = 3;
|
||||
let mut number = 3;
|
||||
println!("Number plus two is: {}", number + 2);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// TODO: Change the line below to fix the compiler error.
|
||||
const NUMBER = 3;
|
||||
const NUMBER: i32 = 3;
|
||||
|
||||
fn main() {
|
||||
println!("Number: {NUMBER}");
|
||||
|
||||
Reference in New Issue
Block a user