rustlings/exercises/02_functions/functions5.rs

9 lines
136 B
Rust
Raw Normal View History

fn main() {
let answer = square(3);
2022-07-12 09:08:29 +00:00
println!("The square of 3 is {}", answer);
}
fn square(num: i32) -> i32 {
num * num;
}