Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intro and variables completed #1

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}