Posted on

FIBONACCI SEQUENCE CODE VB6.0

Cracked by Mia.

Using the Do Until Loop, here’s the code:

x=0
y=1
Do until x>=21
x=x+y
y=x-y
Print x
Loop

this code will print upto the value of 21. Just change the value of 21 with whatever you like. This is written inside a command button. Make sure of indentions in the 2, 3, 4th lines. The result prints in the form.

About miatot

three words: kalog, bastos, emo, makulit. motto: spill your heart on the party table. hobby: procrastination

Mag-iwan ng Tugon

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Palitan )

Twitter picture

You are commenting using your Twitter account. Log Out / Palitan )

Facebook photo

You are commenting using your Facebook account. Log Out / Palitan )

Connecting to %s