Design a form in VB to print the table of a number and Fibonacci series up to given number


Option Explicit
Private Sub cmdexit_Click()
End
End Sub
Private Sub cmdfibno_Click()
Me.Cls
Dim f1, f2, f3, i, num As Integer
f1 = 0
f2 = 1
f3 = 0
num = Val(Text1.Text)
Me.Print 0
For i = 0 To num - 1 Step 1
f1 = f2
f2 = f3
f3 = f1 + f2
Me.Print f3
Next
End Sub
Private Sub cmdtable_Click()
Dim num, i As Integer
Me.Cls
num = Val(Text1.Text)
i = 1
Do While (i <= 10)
Me.Print num * i
i = i + 1
Loop
End Sub

Output:




About the Author

Unknown

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

Post a Comment

 
My Study Voice © 2015 - Designed by Templateism | Distributed By Blogger Templates