diff options
| author | Carol (Nichols || Goulding) <carol.nichols@gmail.com> | 2015-09-17 21:12:00 -0400 |
|---|---|---|
| committer | Carol (Nichols || Goulding) <carol.nichols@gmail.com> | 2015-09-17 21:12:00 -0400 |
| commit | 6324eeafe74867011d901f8e0c4ff74c0311771a (patch) | |
| tree | 6c46a403d4ad3b3276ee1bdd63e3f52677aeeb50 /functions/functions3.rs | |
| parent | dbfab88e610746118b8a0c26340fb677b70e9e75 (diff) | |
Add some exercises about functions!
Diffstat (limited to 'functions/functions3.rs')
| -rw-r--r-- | functions/functions3.rs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/functions/functions3.rs b/functions/functions3.rs new file mode 100644 index 0000000..3dba67c --- /dev/null +++ b/functions/functions3.rs @@ -0,0 +1,41 @@ +// Make me compile! Scroll down for hints :) + +fn main() { + call_me(); +} + +fn call_me(num: i32) { + for i in 0..num { + println!("Ring! Call number {}", i + 1); + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// This time, the function *declaration* is okay, but there's something wrong +// with the place where we're calling the function. |
