Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Interview Questions-2
#4
Not Solved
1) How you will write a recursive function to get the Fibonacci series?
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
Reply


Messages In This Thread
Interview Questions-2 - by supputuri - 06-02-2012, 11:56 AM
RE: Interview Questions-2 - by eswar - 07-27-2012, 12:04 PM
RE: Interview Questions-2 - by elango87 - 12-07-2012, 06:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Interview Questions praveen.sharma 4 5,871 08-23-2022, 02:07 PM
Last Post: ahmad3029
  Interview Questions supputuri 12 13,421 08-23-2022, 11:45 AM
Last Post: ahmad3029
  Interview question nandha 0 1,863 03-28-2018, 03:32 PM
Last Post: nandha
  Few Interview Question asked in various Companies.. shailesh.2.singh@bt.com 1 3,433 08-08-2017, 09:24 AM
Last Post: mallika199317@gmail.com
  Interview Question raghavaqtp 1 3,766 12-20-2014, 09:55 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)