Skip to content

Commit

Permalink
doc(example): add println with loop count
Browse files Browse the repository at this point in the history
Signed-off-by: Mateo Fernandez <mateo.fernandez@etu.umontpellier.fr>
  • Loading branch information
mfernd committed May 30, 2024
1 parent abe0f3d commit 64b43e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cli/examples/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@ fn fibonacci(n: u32) -> u64 {

fn main() {
let n = 10;
println!("Fibonacci number at position {} is: {}", n, fibonacci(n));

for i in 0..=10 {
println!("🚀 Loop {}", i);
println!("Fibonacci number at position {} is: {}", n, fibonacci(n));
std::thread::sleep(std::time::Duration::from_secs(1));
}
}

0 comments on commit 64b43e6

Please sign in to comment.