Fibonacci Numbers in VB.Net

Submitted by: 
Visitors have accessed this post 324 times.

In this tutorial, I will teach you how to create a sequence of Fibonacci Numbers in This method has the ability to create a series of Fibonacci numbers depends of the terms that you’ve enter in the input box. Then it will be displayed in the Listbox. See the procedure below.

Creating Application

Step 1

Open Microsoft Visual Studio 2015 and create a new windows form application. After that, do the form just like this.

Step 2

Double click the button to fire the click event handler of it and do the following code for creating a sequence of Fibonacci Numbers.

  1. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  2. Dim input = InputBox(“Enter The Terms”)
  3. Dim a As Integer = 0
  4. Dim b As Integer = 1
  5. Dim c As Integer
  6. Dim i As Integer
  8. ListBox1.Items.Clear()
  9. ListBox1.Items.Add(“Fibonacci Series is : ”)
  10. For i = 1 To input - 2
  11. c = a + b
  12. a = b
  13. b = c
  14. ListBox1.Items.Add(c)
  15. Next
  16. End Sub

For any questions about this article. You can contact me @

Email – [email protected]
Mobile No. – 09305235027 – TNT
FB Account –

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.