mirror of
https://github.com/andwati/rustlings.git
synced 2026-11-13 23:55:13 +00:00
functions
This commit is contained in:
@@ -1,4 +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() {
|
||||
// DON'T EDIT THIS SOLUTION FILE!
|
||||
// It will be automatically filled after you finish the exercise.
|
||||
call_me(3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user