feat(functions): more small fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// functions1.rs
|
||||
// Make me compile! Execute `rustlings hint functions1` for hints :)
|
||||
// Execute `rustlings hint functions1` or use the `hint` watch subcommand for a hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// functions2.rs
|
||||
// Make me compile! Execute `rustlings hint functions2` for hints :)
|
||||
// Execute `rustlings hint functions2` or use the `hint` watch subcommand for a hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// functions3.rs
|
||||
// Make me compile! Execute `rustlings hint functions3` for hints :)
|
||||
// Execute `rustlings hint functions3` or use the `hint` watch subcommand for a hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
// functions4.rs
|
||||
// Make me compile! Execute `rustlings hint functions4` for hints :)
|
||||
// Execute `rustlings hint functions4` or use the `hint` watch subcommand for a hint.
|
||||
|
||||
// This store is having a sale where if the price is an even number, you get
|
||||
// 10 Rustbucks off, but if it's an odd number, it's 3 Rustbucks off.
|
||||
// (Don't worry about the function bodies themselves, we're only interested
|
||||
// in the signatures for now. If anything, this is a good way to peek ahead
|
||||
// to future exercises!)
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// functions5.rs
|
||||
// Make me compile! Execute `rustlings hint functions5` for hints :)
|
||||
// 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 answer is {}", answer);
|
||||
println!("The square of 3 is {}", answer);
|
||||
}
|
||||
|
||||
fn square(num: i32) -> i32 {
|
||||
|
||||
Reference in New Issue
Block a user