Pages

Search This Blog

Fibonacci Sequence


Module Fibonacci

    Sub Main()
        Dim n, f1, f2, f3 As Integer
        Console.Write("Enter Your Term:")
        n = CInt(Console.ReadLine())
        f1 = 0
        f2 = 1
        f3 = 0
        While n <> 0
            Console.Write(f3 & " ")
            f1 = f2
            f2 = f3
            f3 = f1 + f2
            n -= 1
        End While
        Console.ReadLine()

    End Sub

End Module

17 comments:

  1. ya really it's not working, its an fake 1 to fool

    ReplyDelete
  2. how use to fibonacci with array

    ReplyDelete
  3. 40E7BFBA40Elliot2FA9F85D9F28 December 2024 at 08:57

    737B8980F1
    instagram takipçi

    ReplyDelete
  4. 392183EDEBIsaiahF44DBD125D1 January 2025 at 02:58

    B41D14FCEF
    takipci satin alma

    ReplyDelete