diff options
Diffstat (limited to 'solutions/02_functions/functions2.rs')
| -rw-r--r-- | solutions/02_functions/functions2.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/solutions/02_functions/functions2.rs b/solutions/02_functions/functions2.rs new file mode 100644 index 0000000..f14ffa3 --- /dev/null +++ b/solutions/02_functions/functions2.rs @@ -0,0 +1,11 @@ +// The type of function arguments must be annotated. +// Added the type annotation `u64`. +fn call_me(num: u64) { + for i in 0..num { + println!("Ring! Call number {}", i + 1); + } +} + +fn main() { + call_me(3); +} |
