Skip to content

Instantly share code, notes, and snippets.

@ecmelkytz
Last active October 6, 2015 13:58
Show Gist options
  • Save ecmelkytz/3003551 to your computer and use it in GitHub Desktop.
Save ecmelkytz/3003551 to your computer and use it in GitHub Desktop.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a, b, sayi, deger As Integer
If Val(TextBox2.Text) <> 1 Then
sayi = Val(TextBox2.Text)
a = 1
b = 2
For z = 1 To sayi - 2
deger = b
b = a + b
a = deger
Next z
End If
TextBox1.Text = a
End Sub
End Class
@ecmelkytz
Copy link
Author

Fibonacci serisindeki sırası verilen sayının değerini bulur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment