write a vb script to generate fibonnaci numbers

Answer Posted / mudaseer

vnum=inputbox("enter a number")
i=0
j=1
vstr=i & "," & j & ","
msgbox vstr
for x=1 to vnum-2
k=i+j
vstr=vstr & k & ","
i=j
j=k
next
msgbox vstr

vnum=inputbox("enter a no")
i=0
j=1
vstr=i & "," & j & ","
msgbox vstr
for x=1 to vnum-2
k=i+j
vstr=vstr & k & ","
i=j
j=k
next
msgbox vstr

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which data type/types are supported by vbscript language and what are their specialties?

598


Mention what is the use of option explicit in vbscript?

551


What is vbscript language used for and which earlier language is it modeled upon?

537


Compare java script and vb script?

597


Explain about tristate constants?

587






Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.

1434


where can i learn VB scripint ?

1601


How many types of operators are available in the vbscript language?

539


Explain about constants in vb script?

577


hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?

1791


Which constant is used for print and display functions and works as same as pressing enter key?

532


Why is error handling required?

578


How are arrays declared in the vbscript language?

547


How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...

2905


Description.Create

2162