diff --git a/variables/variables1.rs b/variables/variables1.rs index e0ad5de..4be88a3 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 ca02438..1cb2542 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: i32 = 30; if x == 10 { println!("Ten!"); } else { diff --git a/variables/variables3.rs b/variables/variables3.rs index ec55a95..0be8cb8 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 3f7f937..cce7706 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 = 37; println!("Number {}", x); }