Skip to content

Commit 9d6892b

Browse files
committed
starting over again
1 parent f80fbca commit 9d6892b

File tree

7 files changed

+7
-8
lines changed

7 files changed

+7
-8
lines changed

exercises/00_intro/intro2.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
fn main() {
2-
// TODO: Fix the code to print "Hello world!".
3-
printline!("Hello world!");
2+
println!("Hello world!");
43
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fn main() {
22
// TODO: Add the missing keyword.
3-
x = 5;
3+
let x = 5;
44

55
println!("x has the value {x}");
66
}

exercises/01_variables/variables2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fn main() {
22
// TODO: Change the line below to fix the compiler error.
3-
let x;
3+
let x = 11;
44

55
if x == 10 {
66
println!("x is ten!");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fn main() {
22
// TODO: Change the line below to fix the compiler error.
3-
let x: i32;
3+
let x: i32 = 3;
44

55
println!("Number {x}");
66
}

exercises/01_variables/variables4.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// TODO: Fix the compiler error.
22
fn main() {
3-
let x = 3;
3+
let mut x = 3;
44
println!("Number {x}");
55

66
x = 5; // Don't change this line

exercises/01_variables/variables5.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ fn main() {
33
println!("Spell a number: {number}");
44

55
// TODO: Fix the compiler error by changing the line below without renaming the variable.
6-
number = 3;
6+
let number = 3;
77
println!("Number plus two is: {}", number + 2);
88
}

exercises/01_variables/variables6.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// TODO: Change the line below to fix the compiler error.
2-
const NUMBER = 3;
2+
const NUMBER: u32 = 3;
33

44
fn main() {
55
println!("Number: {NUMBER}");

0 commit comments

Comments
 (0)