Programa de la serie Fibonacci
Public Class Form13
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a, b, c, n As Integer
n = InputBox("digite wl limite de la serie")
a = 0
b = 1
c = a + b
lista.Items.Clear()
While c < n
lista.Items.Add(c)
a = b
b = c
c = a + b
End While
End Sub
End Class
Comentarios
Publicar un comentario