From 64b43e64975d836429f5b5bdb612a256d2962871 Mon Sep 17 00:00:00 2001 From: Mateo Fernandez Date: Thu, 30 May 2024 17:35:27 +0200 Subject: [PATCH] doc(example): add println with loop count Signed-off-by: Mateo Fernandez --- src/cli/examples/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cli/examples/main.rs b/src/cli/examples/main.rs index 772f207..06d6a9a 100644 --- a/src/cli/examples/main.rs +++ b/src/cli/examples/main.rs @@ -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)); + } }