Tuesday, February 22, 2011

Write a Visual Basic programs for generating Fibonacci series.

WAP for generating Fibonacci series.
___________________________________

Private Sub Command1_Click()
List1.Clear
num = Val(Text1.Text)
a = 0
b = 1
c = 0
List1.AddItem (a)
List1.AddItem (b)
For i = 1 To num Step 1
c = a + b
List1.AddItem (c)
a = b
b = c
Next i
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
List1.Clear

End Sub
________________________________
OUTPUT
________________________________



DOWNLOAD

____________________________________

Download its form

Download its Image



No comments:

Post a Comment