diff --git a/variables/variables1.rs b/variables/variables1.rs index e0ad5de8..4be88a30 100644 --- a/variables/variables1.rs +++ b/variables/variables1.rs @@ -1,7 +1,7 @@ // Make me compile! Scroll down for hints :) fn main() { - x = 5; + let x = 5; println!("x has the value {}", x); } diff --git a/variables/variables2.rs b/variables/variables2.rs index ca024387..b592da38 100644 --- a/variables/variables2.rs +++ b/variables/variables2.rs @@ -1,7 +1,7 @@ // Make me compile! Scroll down for hints :) fn main() { - let x; + let x = 10; if x == 10 { println!("Ten!"); } else { diff --git a/variables/variables3.rs b/variables/variables3.rs index ec55a951..0be8cb82 100644 --- a/variables/variables3.rs +++ b/variables/variables3.rs @@ -1,7 +1,7 @@ // Make me compile! Scroll down for hints :) fn main() { - let x = 3; + let mut x = 3; println!("Number {}", x); x = 5; println!("Number {}", x); diff --git a/variables/variables4.rs b/variables/variables4.rs index 3f7f937d..6334c78c 100644 --- a/variables/variables4.rs +++ b/variables/variables4.rs @@ -1,7 +1,7 @@ // Make me compile! Scroll down for hints :) fn main() { - let x: i32; + let x: i32 = 777; println!("Number {}", x); }