Content
@
0 reply
0 recast
0 reaction
foxx
@foxx
this right?π // - An apple costs 2 rustbucks. // - If Mary buys more than 40 apples, each apple only costs 1 rustbuck! ```rust fn calculate_price_of_apples(apple: i32) -> i32 { if apple <= 40 { apple * 2 } else { apple } } ```
2 replies
0 recast
0 reaction
MetaEndπ©
@metaend.eth
LGTM
0 reply
0 recast
0 reaction
Shriphani Palakodety
@shriphani
Overflow cases ? Either saturating mul or return an i64
0 reply
0 recast
1 reaction