VBSlip 5_1_2015-16



=================================Slip 5_1 ================================= Write a VB Program to display Fibonacci series up to given term (Accept term using InputBox )and display Fibonacci series on to the form. =========================================================================
 


Private Sub Command1_Click()
                n = InputBox("Enter The Term")
                a = 0
                b = 1
                Print "Fibonacci Series is : "
                Print a
                Print b
                For i = 1 To n - 2
                                c = a + b
                                a = b
                                b = c
                                Print c
                Next
End Sub
 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.