write a vb script to display factorial of a number using
function



write a vb script to display factorial of a number using function..

Answer / mudaseer

sub fact(pnum)
dim vf
vf=1
for i=2 to pnum
vf=vf*i
next
msgbox vf
end sub
call fact(0)
call fact(3)

Is This Answer Correct ?    4 Yes 14 No

Post New Answer

More VB Script Interview Questions

What are the 2 ways in which a variable can be declared in the vbscript language?

1 Answers  


How to pass argument by reference to a function in vbscript?

1 Answers  


hai all.iam chandu..please let me know how to test a link in QTP when it is changing at run time..and what property we should take while we r using descriptive programming for a link..

6 Answers  


Explain the tristate constants in vbscript?

1 Answers  


Differentiate javascript and vbscript?

1 Answers  


write a vb script to generate the following pattern ***** **** *** ** *

7 Answers   Blue Star,


What variable can you use to share info across the whole application for one user?

2 Answers  


Mention what is vbscript?

1 Answers  


How to use Text file (Notepad) as ur data source in QTP? Can u please provide some function code for it?

1 Answers  


Hi, Anybody could tell me What is the 3rd Largest Number in the series..Thanks in Advance..

3 Answers   Amazon, bcbs,


Give examples where vb script can directly run on users system with windows as os?

1 Answers  


How will you format a number in percetage format in vbscript?

1 Answers  


Categories