mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-01-09 20:03:24 +03:00
14 lines
301 B
Rust
14 lines
301 B
Rust
// functions2.rs
|
|
// Make me compile! Execute `rustlings hint functions2` for hints :)
|
|
|
|
fn main() {
|
|
call_me(3);
|
|
}
|
|
|
|
// Below I added the i32, beacuse the function expected a type to set/specified.
|
|
fn call_me(num: i32) {
|
|
for i in 0..num {
|
|
println!("Ring! Call number {}", i + 1);
|
|
}
|
|
}
|