# Fibonacci Numbers done recrusively

Page 1 of 1

## 1 Replies - 2045 Views - Last Post: 18 February 2010 - 07:06 PM

### #1 m2s87

• D.I.C Regular

Reputation: 21
• Posts: 390
• Joined: 28-November 06

# Fibonacci Numbers done recrusively

Posted 10 January 2007 - 10:58 AM

Description: use it like: f_numbers=fib_r(nr) you can return spetsific number like: x=split(fib_r(nr),",") fib46=x(45)An efficient recursive solution returning Fibonacci Numbers.
```Function fib_r(nr#, Optional a1# = 1, Optional a2# = 0) As String
If nr > 1 And nr < 1476 Then fib_r = fib_r(nr - 1, a1 + a2, a1) Else: If nr > 1476 Then fib_r = "viga"
fib_r = a1 + a2 & "," & fib_r
End Function

```

Is This A Good Question/Topic? 0

## Replies To: Fibonacci Numbers done recrusively

### #2 ccyndimolina

Reputation: 0
• Posts: 1
• Joined: 16-January 10

## Re: Fibonacci Numbers done recrusively

Posted 18 February 2010 - 07:06 PM

That was a great code snippet! THANK YOU!

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }