write a vb script to calculate factorial of a number?

Answer Posted / mudaseer

vf=1
vnum=inputbox("enter a no")
for i=2 to vnum
vf=vf*i
next
msgbox vf

Is This Answer Correct ?    98 Yes 25 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which in-built function is used to format the number in the vbscript language?

581


Mention what is select case statement?

548


In the Web page we have a table link, if we click on that link all the contents under that link will be sorted (asscending/Descending). Now i want to check in which order the list is ? for that i need to get the data in to some var How can i get that cells data?

2026


Explain the .wsf files?

533


How will you convert a string to upper case string using vbscript?

561






What purpose does ‘on error resume next’ serves?

553


Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?

582


What are subprocedures in vbscript?

666


How to open excel in vb script?

574


what is event handling?

586


What is loose binding? Why is it not a good practice to use it?

635


Can any one provide code for Mid(string,start[,length]). I have been asked to write code for Mid(). i.e We need to define our own function say MyMid() which should behave same like built-in Mid function

1921


How are values assigned to the variables in the vbscript language?

579


Mention what is byref and byval parameters in vbscript?

579


How to create a function in vbscript?

590