mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-09 20:29:18 +00:00
commit to mytest
This commit is contained in:
parent
fea67ecd81
commit
b85368d722
@ -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);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user