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