mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-28 00:00:03 +03:00
Complete Quiz 1
This commit is contained in:
parent
ef82b93271
commit
fca2d54cb8
|
@ -13,10 +13,11 @@
|
|||
//
|
||||
// No hints this time ;)
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
// Put your function here!
|
||||
// fn calculate_price_of_apples {
|
||||
fn calculate_price_of_apples(quantity: i32) -> i32 {
|
||||
if quantity > 40 { quantity } else { quantity * 2 }
|
||||
}
|
||||
|
||||
// Don't modify this function!
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue