Skip to content

Commit

Permalink
Merge pull request #1 from Joaopmorais/Intro_and_variables
Browse files Browse the repository at this point in the history
Intro and variables completed
  • Loading branch information
Joaopmorais committed Feb 16, 2024
2 parents f512400 + 2debeb9 commit 5d561e8
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 22 deletions.
2 changes: 0 additions & 2 deletions exercises/00_intro/intro1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
// Execute `rustlings hint intro1` or use the `hint` watch subcommand for a
// hint.

// I AM NOT DONE

fn main() {
println!("Hello and");
println!(r#" welcome to... "#);
Expand Down
4 changes: 1 addition & 3 deletions exercises/00_intro/intro2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// Execute `rustlings hint intro2` or use the `hint` watch subcommand for a
// hint.

// I AM NOT DONE

fn main() {
printline!("Hello there!")
println!("Hello there!")
}
3 changes: 1 addition & 2 deletions exercises/01_variables/variables1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
// Execute `rustlings hint variables1` or use the `hint` watch subcommand for a
// hint.

// I AM NOT DONE

fn main() {
x = 5;
let x = 5;
println!("x has the value {}", x);
}
4 changes: 1 addition & 3 deletions exercises/01_variables/variables2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
// Execute `rustlings hint variables2` or use the `hint` watch subcommand for a
// hint.

// I AM NOT DONE

fn main() {
let x;
let x = 10;
if x == 10 {
println!("x is ten!");
} else {
Expand Down
4 changes: 1 addition & 3 deletions exercises/01_variables/variables3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// Execute `rustlings hint variables3` or use the `hint` watch subcommand for a
// hint.

// I AM NOT DONE

fn main() {
let x: i32;
let x: i32 = 12;
println!("Number {}", x);
}
3 changes: 1 addition & 2 deletions exercises/01_variables/variables4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
// Execute `rustlings hint variables4` or use the `hint` watch subcommand for a
// hint.

// I AM NOT DONE

fn main() {
let x = 3;
let mut x = 3;
println!("Number {}", x);
x = 5; // don't change this line
println!("Number {}", x);
Expand Down
6 changes: 2 additions & 4 deletions exercises/01_variables/variables5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
// Execute `rustlings hint variables5` or use the `hint` watch subcommand for a
// hint.

// I AM NOT DONE

fn main() {
let number = "T-H-R-E-E"; // don't change this line
let mut number = "T-H-R-E-E"; // don't change this line
println!("Spell a Number : {}", number);
number = 3; // don't rename this variable
let number = 3; // don't rename this variable
println!("Number plus two is : {}", number + 2);
}
4 changes: 1 addition & 3 deletions exercises/01_variables/variables6.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// Execute `rustlings hint variables6` or use the `hint` watch subcommand for a
// hint.

// I AM NOT DONE

const NUMBER = 3;
const NUMBER : i32 = 3;
fn main() {
println!("Number {}", NUMBER);
}

0 comments on commit 5d561e8

Please sign in to comment.