control flpw

This commit is contained in:
Hariettemaina 2022-09-09 15:24:52 +03:00
parent 25673f002f
commit bad3f7c461
3 changed files with 11 additions and 4 deletions

View File

@ -1,7 +1,7 @@
// functions5.rs
// Execute `rustlings hint functions5` or use the `hint` watch subcommand for a hint.
// I AM NOT DONE
fn main() {
let answer = square(3);

View File

@ -1,13 +1,18 @@
// if1.rs
// Execute `rustlings hint if1` or use the `hint` watch subcommand for a hint.
// I AM NOT DONE
pub fn bigger(a: i32, b: i32) -> i32 {
// Complete this function to return the bigger number!
// Do not use:
// - another function call
// - additional variables
if a > b {
a
}else{
b
}
}
// Don't mind this for now :)

View File

@ -9,8 +9,10 @@
pub fn foo_if_fizz(fizzish: &str) -> &str {
if fizzish == "fizz" {
"foo"
} else {
1
} else if fizzish == "fuzz" {
"bar"
}else {
"baz"
}
}