Skip to main content

Write a VB Program to display Fibonacci series up to given term (Accept term using input Box )and display Fibonacci series on to the form.

· One min read
Kaustubh Kulkarni
file.vb
  
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