mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-31 15:59:18 +00:00
fixes functions4
This commit is contained in:
parent
d928df0942
commit
f5708d39ae
@ -8,7 +8,7 @@ fn main() {
|
|||||||
println!("Your sale price is {}", sale_price(original_price));
|
println!("Your sale price is {}", sale_price(original_price));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sale_price(price: i32) -> {
|
fn sale_price(price: i32) -> i32 {
|
||||||
if is_even(price) {
|
if is_even(price) {
|
||||||
price - 10
|
price - 10
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user