Merge pull request #6 from m1xb3r/quiz

Successfully passed quiz nr1
This commit is contained in:
m6r 2022-11-18 22:44:28 +01:00 committed by GitHub
commit 4c7d0cb161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,10 +10,16 @@
// Write a function that calculates the price of an order of apples given // Write a function that calculates the price of an order of apples given
// the quantity bought. No hints this time! // the quantity bought. No hints this time!
// I AM NOT DONE
// Put your function here! // Put your function here!
// fn calculate_price_of_apples { fn calculate_price_of_apples(apples: u32) -> u32 {
if apples > 40 {
apples *1
}
else{
apples *2
}
}
// Don't modify this function! // Don't modify this function!
#[test] #[test]