mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-06 10:49:19 +00:00
Exercise 13
This commit is contained in:
parent
7b53c94328
commit
1aed8d48f6
@ -3,13 +3,13 @@
|
||||
// Execute `rustlings hint functions5` or use the `hint` watch subcommand for a
|
||||
// hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
|
||||
fn main() {
|
||||
let answer = square(3);
|
||||
let answer:i32 = square(3);
|
||||
println!("The square of 3 is {}", answer);
|
||||
}
|
||||
|
||||
fn square(num: i32) -> i32 {
|
||||
num * num;
|
||||
(num * num)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user