diff options
| author | anand <anand.panchdhari@gmail.com> | 2025-11-18 22:40:54 +0530 |
|---|---|---|
| committer | anand <anand.panchdhari@gmail.com> | 2025-11-18 22:40:54 +0530 |
| commit | 8597b29e143cdeae50eafae06e0d8ed900b25295 (patch) | |
| tree | 065a09c30fa7087937d94f3207254dfe042de90a /exercises/02_functions/functions5.rs | |
| parent | f80fbca12e47014a314e5e931678529c28cd9fd8 (diff) | |
Completed till exercise 4
Diffstat (limited to 'exercises/02_functions/functions5.rs')
| -rw-r--r-- | exercises/02_functions/functions5.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exercises/02_functions/functions5.rs b/exercises/02_functions/functions5.rs index 34a2ac7..800703c 100644 --- a/exercises/02_functions/functions5.rs +++ b/exercises/02_functions/functions5.rs @@ -1,9 +1,9 @@ // TODO: Fix the function body without changing the signature. fn square(num: i32) -> i32 { - num * num; + num * num } fn main() { - let answer = square(3); + let answer: i32 = square(3); println!("The square of 3 is {answer}"); } |
