mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-11 21:29:18 +00:00
Quiz1
This commit is contained in:
parent
b6d2ea70cd
commit
8a6aecac9c
@ -11,7 +11,13 @@
|
||||
// I AM NOT DONE
|
||||
|
||||
// Put your function here!
|
||||
// fn calculate_price_of_apples {
|
||||
fn calculate_price_of_apples(apples: u32) -> u32 {
|
||||
if apples > 40 {
|
||||
apples
|
||||
} else {
|
||||
apples * 2
|
||||
}
|
||||
}
|
||||
|
||||
// Don't modify this function!
|
||||
#[test]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user