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. // ready for the next exercise, remove the `I AM NOT DONE` comment below.
// Execute the command `rustlings hint intro1` for a hint. // Execute the command `rustlings hint intro1` for a hint.
// I AM NOT DONE
fn main() { fn main() {
println!("Hello and"); println!("Hello and");
println!(r#" welcome to... "#); println!(r#" welcome to... "#);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,9 @@
// variables6.rs // variables6.rs
// Make me compile! Execute the command `rustlings hint variables6` if you want a hint :) // 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() { fn main() {
println!("Number {}", NUMBER); println!("Number {}", NUMBER);
} }