summaryrefslogtreecommitdiff
path: root/solutions/quizzes/quiz1.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-07-05 15:38:59 +0200
committermo8it <mo8it@proton.me>2024-07-05 15:38:59 +0200
commit65834fc42012cb6c0412757b830294e9af26549f (patch)
tree51abbacbf2192cde3f13d0eab37bd38f44095787 /solutions/quizzes/quiz1.rs
parentf5a4965de7174e122c5d99ec0a300285d0a0c658 (diff)
Improve quizes
Diffstat (limited to 'solutions/quizzes/quiz1.rs')
-rw-r--r--solutions/quizzes/quiz1.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/solutions/quizzes/quiz1.rs b/solutions/quizzes/quiz1.rs
index bc76166..5503c8c 100644
--- a/solutions/quizzes/quiz1.rs
+++ b/solutions/quizzes/quiz1.rs
@@ -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 {