mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-03 17:29:18 +00: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…
x
Reference in New Issue
Block a user