control flow, primitive types and vectors
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
// the quantity bought.
|
||||
// fn calculate_price_of_apples(???) -> ??? { ??? }
|
||||
|
||||
fn calculate_price_of_apples(qty: u32) -> u32 {
|
||||
if qty < 41 { qty * 2 } else { qty }
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// You can optionally experiment here.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user