2018-02-22 06:09:53 +00:00
|
|
|
// functions5.rs
|
2019-11-11 15:51:38 +00:00
|
|
|
// Make me compile! Execute `rustlings hint functions5` for hints :)
|
2015-09-19 01:28:27 +01:00
|
|
|
|
2019-11-11 12:38:24 +00:00
|
|
|
// I AM NOT DONE
|
|
|
|
|
2015-09-19 01:28:27 +01:00
|
|
|
fn main() {
|
|
|
|
let answer = square(3);
|
|
|
|
println!("The answer is {}", answer);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn square(num: i32) -> i32 {
|
|
|
|
num * num;
|
|
|
|
}
|