Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
IndhuSubash-2007 authored Dec 20, 2024
1 parent a5f1b6f commit 03d09ac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Day-19/indhu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def print_fibonacci(n, a=0, b=1):
if a > n:
return
print(a, end=" ")
print_fibonacci(n, b, a + b)

n = 100
print(f"Fibonacci numbers up to {n}:")
print_fibonacci(n)

0 comments on commit 03d09ac

Please sign in to comment.