commit to mytest

This commit is contained in:
haozhuoD 2021-07-09 03:50:05 +00:00
parent fea67ecd81
commit b85368d722
4 changed files with 8 additions and 8 deletions

View File

@ -1,10 +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 x = 3;
let mut x = 3;
println!("Number {}", x);
x = 5; // don't change this line
println!("Number {}", x);

View File

@ -1,9 +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;
let x: i32 = 666;
println!("Number {}", x);
}

View File

@ -1,11 +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);
number = 3;
let number = 3;
println!("Number plus two is : {}", number + 2);
}

View File

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