Improve quizes

This commit is contained in:
mo8it
2024-07-05 15:38:59 +02:00
parent f5a4965de7
commit 65834fc420
4 changed files with 4 additions and 17 deletions
+2 -3
View File
@@ -1,8 +1,7 @@
// Mary is buying apples. The price of an apple is calculated as follows:
// - An apple costs 2 rustbucks.
// - If Mary buys more than 40 apples, each apple only costs 1 rustbuck!
// Write a function that calculates the price of an order of apples given the
// quantity bought.
// - However, if Mary buys more than 40 apples, the price of each apple in the
// entire order is reduced to only 1 rustbuck!
fn calculate_price_of_apples(n_apples: u64) -> u64 {
if n_apples > 40 {