mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-12 21:59:18 +00:00
quiz
This commit is contained in:
parent
bad3f7c461
commit
ebdf490cca
@ -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" {
|
||||
|
||||
@ -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 {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user