First quiz and its related modules

This commit is contained in:
Nidhal Messaoudi
2023-02-26 17:28:24 +01:00
parent 36e66b545e
commit 52ed5dbcf9
22 changed files with 60 additions and 98 deletions

View File

@@ -1,13 +1,11 @@
// functions5.rs
// Execute `rustlings hint functions5` or use the `hint` watch subcommand for a hint.
// I AM NOT DONE
fn main() {
let answer = square(3);
println!("The square of 3 is {}", answer);
}
fn square(num: i32) -> i32 {
num * num;
return num * num;
}