New Exercises resolved

This commit is contained in:
Faiizan Hussain 2023-12-01 17:39:37 +00:00
parent 06e5fd8ae2
commit e2a53eaeed
3 changed files with 8 additions and 2 deletions

View File

@ -3,7 +3,6 @@
// 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

@ -2,13 +2,18 @@
//
// 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 {
return a;
} else {
return b;
}
}
// Don't mind this for now :)

View File

@ -7,6 +7,8 @@
// I AM NOT DONE
pub fn foo_if_fizz(fizzish: &str) -> &str {
if fizzish == "fizz" {
"foo"