mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-03 01:09:18 +00:00
14 lines
317 B
Rust
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);
|
|
}
|
|
}
|