Skip to content

Commit 0fb9479

Browse files
authored
Create FunctionWithReturnValue.rs
1 parent ad6fc23 commit 0fb9479

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
fn main() {
2+
let result = square(5);
3+
println!("Square: {}", result);
4+
}
5+
6+
fn square(num: i32) -> i32 {
7+
num * num
8+
}

0 commit comments

Comments
 (0)