rustlings/exercises/functions/functions5.rs
IloveKanade b1dbf15193 my rustlng answer 3.1 ~ 4.1.2
Signed-off-by: IloveKanade <xjlgxlgx@gmail.com>
2022-04-24 17:30:27 +08:00

14 lines
235 B
Rust

// functions5.rs
// Make me compile! Execute `rustlings hint functions5` for hints :)
// I AM NOT DONE
fn main() {
let answer = square(3);
println!("The answer is {}", answer);
}
fn square(num: i32) -> i32 {
num * num
}