mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-07 03:09:19 +00:00
Exercise 12
This commit is contained in:
parent
3ca6d269cc
commit
7b53c94328
@ -8,14 +8,14 @@
|
||||
// Execute `rustlings hint functions4` or use the `hint` watch subcommand for a
|
||||
// hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
|
||||
fn main() {
|
||||
let original_price = 51;
|
||||
let original_price:i32 = 51;
|
||||
println!("Your sale price is {}", sale_price(original_price));
|
||||
}
|
||||
|
||||
fn sale_price(price: i32) -> {
|
||||
fn sale_price(price: i32) -> i32{
|
||||
if is_even(price) {
|
||||
price - 10
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user