QBJS - QBasic for the Web
#3
Fibonacci Infinity


Code: (Select All)
Dim fi1 As Double: Dim fi2 As Double: Dim fi3 As Double
fi1 = 1: fi2 = 1: fi3 = 1: dim a$ as string ' FIBrus.bas
For da = 1 To 102 ' DANILIN & Fibonacci
a$ = Str$(fi3)
d = len(a$)
    For i = 1 To 25-d: Print ".";: Next
    Print fi3
    fi3 = fi2 + fi1
    fi1 = fi2
    fi2 = fi3
Next

https://v6p9d9t4.ssl.hwcdn.net/html/5799...DQxDDEQw==



Code: (Select All)
...................1
...................2
...................3
............39088169
............63245986
...........102334155
.1779979416004714189
.2880067194370816120
.4660046610375530309
.7540113804746346429
12200160415121876738

Plus I create variants Fibonacci Infinity on Python & C#
Write name of program in 1st line to copy & paste & save filename.bas
Insert program pictures: press print-screen-shot button
Open paint & Paste & Save as PNG
Add picture file to program topic

Russia looks world from future. Big data is peace data.
I never recommend anything & always write only about myself
Reply


Messages In This Thread
QBJS - QBasic for the Web - by dbox - 04-18-2022, 07:10 PM
RE: QBJS - QBasic for the Web - by bplus - 04-23-2022, 03:37 PM
RE: QBJS - QBasic for the Web - by DANILIN - 06-02-2022, 08:36 PM



Users browsing this thread: 2 Guest(s)