diff --git a/exercises/if/if2.rs b/exercises/if/if2.rs index 86e1295d..a77d212b 100644 --- a/exercises/if/if2.rs +++ b/exercises/if/if2.rs @@ -4,7 +4,7 @@ // Step 2: Get the bar_for_fuzz and default_to_baz tests passing! // Execute `rustlings hint if2` or use the `hint` watch subcommand for a hint. -// I AM NOT DONE + pub fn foo_if_fizz(fizzish: &str) -> &str { if fizzish == "fizz" { diff --git a/exercises/quiz1.rs b/exercises/quiz1.rs index dbb5cdc9..3155ff8d 100644 --- a/exercises/quiz1.rs +++ b/exercises/quiz1.rs @@ -12,6 +12,17 @@ // I AM NOT DONE + +fn calculate_price_of_apples(apples: i32) ->i32{ + + if apples > 40{ + apples + }else{ + apples * 2 + } + +} + // Put your function here! // fn calculate_price_of_apples {