rustlings/exercises/functions/functions5.rs
Mustakim-Khan 0646013237 seance 1
2021-04-13 17:33:22 +02:00

14 lines
219 B
Rust

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