This commit is contained in:
stephan.klauberg 2023-09-20 18:30:56 +02:00
parent c98e5af5df
commit 8f79ae0571
5 changed files with 11 additions and 8 deletions

View File

@ -3,8 +3,11 @@
// Execute `rustlings hint functions1` or use the `hint` watch subcommand for a
// hint.
// I AM NOT DONE
// I AM DONE
fn main() {
call_me();
}
fn call_me() {
}

View File

@ -9,7 +9,7 @@ fn main() {
call_me(3);
}
fn call_me(num:) {
fn call_me(num:u8) {
for i in 0..num {
println!("Ring! Call number {}", i + 1);
}

View File

@ -3,10 +3,10 @@
// Execute `rustlings hint variables4` or use the `hint` watch subcommand for a
// hint.
// I AM NOT DONE
// I AM 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

@ -3,11 +3,11 @@
// Execute `rustlings hint variables5` or use the `hint` watch subcommand for a
// hint.
// I AM NOT DONE
// I AM DONE
fn main() {
let 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);
}

View File

@ -3,9 +3,9 @@
// Execute `rustlings hint variables6` or use the `hint` watch subcommand for a
// hint.
// I AM NOT DONE
// I AM DONE
const NUMBER = 3;
const NUMBER:usize = 3;
fn main() {
println!("Number {}", NUMBER);
}