1
0
Fork 0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-02-20 00:00:03 +03:00
rustlings/exercises/02_functions/functions5.rs

9 lines
136 B
Rust
Raw Normal View History

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