mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-11 21:29:18 +00:00
returning a type
This commit is contained in:
parent
cdbf513840
commit
741b313bd2
@ -1,7 +1,7 @@
|
||||
// functions3.rs
|
||||
// Execute `rustlings hint functions3` or use the `hint` watch subcommand for a hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
|
||||
fn main() {
|
||||
call_me(3);
|
||||
|
||||
@ -14,7 +14,7 @@ fn main() {
|
||||
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