From d578d1966aada8b8edffccad08ad027a219d362d Mon Sep 17 00:00:00 2001 From: Paul Czeresko <p.czeresko.3@gmail.com> Date: Sat, 20 Jul 2019 10:01:01 -0400 Subject: [PATCH] Complete variables section --- exercises/variables/variables1.rs | 2 +- exercises/variables/variables2.rs | 2 +- exercises/variables/variables3.rs | 2 +- exercises/variables/variables4.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/variables/variables1.rs b/exercises/variables/variables1.rs index 1cdd270..708e852 100644 --- a/exercises/variables/variables1.rs +++ b/exercises/variables/variables1.rs @@ -2,7 +2,7 @@ // Make me compile! Scroll down for hints :) fn main() { - x = 5; + let x = 5; println!("x has the value {}", x); } diff --git a/exercises/variables/variables2.rs b/exercises/variables/variables2.rs index a0b4a37..0999b65 100644 --- a/exercises/variables/variables2.rs +++ b/exercises/variables/variables2.rs @@ -2,7 +2,7 @@ // Make me compile! Scroll down for hints :) fn main() { - let x; + let x: u32 = 9; if x == 10 { println!("Ten!"); } else { diff --git a/exercises/variables/variables3.rs b/exercises/variables/variables3.rs index 165a277..9076615 100644 --- a/exercises/variables/variables3.rs +++ b/exercises/variables/variables3.rs @@ -2,7 +2,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/exercises/variables/variables4.rs b/exercises/variables/variables4.rs index 71ebf0f..cde9bf7 100644 --- a/exercises/variables/variables4.rs +++ b/exercises/variables/variables4.rs @@ -2,7 +2,7 @@ // Make me compile! Scroll down for hints :) fn main() { - let x: i32; + let x: i32 = 69; println!("Number {}", x); }