06-24-2014, 02:28 PM
1) How you will write a recursive function to get the Fibonacci series?
ANS:
ANS:
Code:
Fibonacci(inputbox("Enter Number"))
Function Fibonacci(Fib)
If Fib>=2 Then
a=0
b=1
print a
print b
For i=1 to Fib-2
k=a+b
print k
a=b
b=k
Next
Else
msgbox "Please Enter The Number Greaterthan 1"
end if
End Function