2024-06-10 16:05:25 +08:00

15 lines
264 B
Rust

// functions5.rs
//
// 執行 `rustlings hint functions5` 或使用 `hint` watch 子命令來獲取提示。
// I AM NOT DONE
fn main() {
let answer = square(3);
println!("The square of 3 is {}", answer);
}
fn square(num: i32) -> i32 {
num * num;
}