diff options
Diffstat (limited to 'rust/rustlings/solutions/02_functions/functions3.rs')
| -rw-r--r-- | rust/rustlings/solutions/02_functions/functions3.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rust/rustlings/solutions/02_functions/functions3.rs b/rust/rustlings/solutions/02_functions/functions3.rs new file mode 100644 index 0000000..ce5fe8e --- /dev/null +++ b/rust/rustlings/solutions/02_functions/functions3.rs @@ -0,0 +1,10 @@ +fn call_me(num: u8) { + for i in 0..num { + println!("Ring! Call number {}", i + 1); + } +} + +fn main() { + // `call_me` expects an argument. + call_me(5); +} |