Hi all
I need help converting this recursive function to non-recursive
Code:int nnn(int n){ if(n>1){ return nnn(n-1)+nnn(n-2); }else{ return 1; } }VB Code:
Function nnn(N as Integer) As Integer If N>1 Then Return nnn(N-1)+nnn(N-2); Else Return 1; End If End Function




Reply With Quote