rustlings/exercises/functions/functions2.rs
2024-05-19 22:23:14 -07:00

14 lines
317 B
Rust

// functions2.rs
// Make me compile! Execute `rustlings hint functions2` for hints :)
fn main() {
call_me(3);
}
// NOTE: It is interesting that the function is defined below main but main can still call this.
fn call_me(num: i32) {
for i in 0..num {
println!("Ring! Call number {}", i + 1);
}
}