12-07-2012, 06:43 PM
For the 1st question,
1) How you will write a recursive function to get the Fibonacci series?
1) How you will write a recursive function to get the Fibonacci series?
Code:
Dim i,j,k
Dim Fib
i = 1
j = 0
k = 0
Fib = 20
Fibonacci(Fib)
Function Fibonacci(Fib)
For z=0 to Fib
Print k
j = i
i = k
k = i+j
Next
End Function