mirror of
https://github.com/andwati/rustlings.git
synced 2026-11-12 23:25:13 +00:00
functions
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
fn call_me(num: u8) {
|
||||
for i in 0..num {
|
||||
println!("Ring! Call number {}", i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// DON'T EDIT THIS SOLUTION FILE!
|
||||
// It will be automatically filled after you finish the exercise.
|
||||
// `call_me` expects an argument.
|
||||
call_me(5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user