rustlings/exercises/functions/functions2.rs

14 lines
301 B
Rust
Raw Normal View History

2018-02-22 09:09:53 +03:00
// functions2.rs
// Make me compile! Execute `rustlings hint functions2` for hints :)
2015-09-18 04:12:00 +03:00
fn main() {
call_me(3);
}
2022-05-28 03:04:58 +03:00
// Below I added the i32, beacuse the function expected a type to set/specified.
fn call_me(num: i32) {
2015-09-18 04:12:00 +03:00
for i in 0..num {
println!("Ring! Call number {}", i + 1);
}
}