Revert "finished first batch"

This reverts commit 455cae6f2875f160508162525b0283de0098ef39.
This commit is contained in:
Stanislav Pankrashin 2022-06-23 17:06:30 +12:00
parent 34f7077523
commit 76967b4561
8 changed files with 24 additions and 8 deletions

View File

@ -5,6 +5,8 @@
// ready for the next exercise, remove the `I AM NOT DONE` comment below.
// Execute the command `rustlings hint intro1` for a hint.
// I AM NOT DONE
fn main() {
println!("Hello and");
println!(r#" welcome to... "#);

View File

@ -2,6 +2,8 @@
// Make the code print a greeting to the world.
// Execute `rustlings hint intro2` for a hint.
// I AM NOT DONE
fn main() {
println!("Hello World!");
println!("Hello {}!");
}

View File

@ -2,7 +2,9 @@
// Make me compile!
// Execute the command `rustlings hint variables1` if you want a hint :)
// I AM NOT DONE
fn main() {
let x = 5;
x = 5;
println!("x has the value {}", x);
}

View File

@ -1,8 +1,10 @@
// variables2.rs
// Make me compile! Execute the command `rustlings hint variables2` if you want a hint :)
// I AM NOT DONE
fn main() {
let x: u8 = 10;
let x;
if x == 10 {
println!("Ten!");
} else {

View File

@ -1,8 +1,10 @@
// variables3.rs
// Make me compile! Execute the command `rustlings hint variables3` if you want a hint :)
// I AM NOT DONE
fn main() {
let mut x = 3;
let x = 3;
println!("Number {}", x);
x = 5; // don't change this line
println!("Number {}", x);

View File

@ -1,7 +1,9 @@
// variables4.rs
// Make me compile! Execute the command `rustlings hint variables4` if you want a hint :)
// I AM NOT DONE
fn main() {
let x: i32 = 1;
let x: i32;
println!("Number {}", x);
}

View File

@ -1,9 +1,11 @@
// variables5.rs
// Make me compile! Execute the command `rustlings hint variables5` if you want a hint :)
// I AM NOT DONE
fn main() {
let number = "T-H-R-E-E"; // don't change this line
println!("Spell a Number : {}", number);
let new_number = 3;
println!("Number plus two is : {}", new_number + 2);
number = 3;
println!("Number plus two is : {}", number + 2);
}

View File

@ -1,7 +1,9 @@
// variables6.rs
// Make me compile! Execute the command `rustlings hint variables6` if you want a hint :)
const NUMBER: i32 = 3;
// I AM NOT DONE
const NUMBER = 3;
fn main() {
println!("Number {}", NUMBER);
}