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 is visual basic?

2 Answers   Seion Infotech,


How to replace junk code recorded by QTP with a mall function.

0 Answers  


Give me sm ideas to write Vbscripts abt protocol testing abilash700@gmail.com.

0 Answers  


Sub link() Dim k As Integer Dim rand As Integer Dim URL As String Dim foldernum As Integer Dim folderstring As String Dim filenum As Integer Dim filestring As String k = 1 'for AC Numbers For i = 11 To 40 foldernum = 0 foldernum = 1000 + i folderstring = CStr(foldernum) folderstring = Mid(folderstring, 2, 3) folder = "ac" & folderstring 'folderstring = Sheets(2).Cells(i, 1) ' for Number of Random files For j = 1 To 10 rand = Int(Rnd * (200 - 1) + 1) filenum = 0 filenum = 1000 + rand filestring = CStr(filenum) filestring = Mid(filestring, 2, 3) 'URL = "http://ceobihar.nic.in/PSCDROM/ac" & folderstring & "/i" & folderstring & "0" & filestring & ".pdf" URL = "http://www.elections.tn.gov.in/pdfs/dt1/" & folder & "/" & folder & filestring & ".pdf" ' URL =http://www.wb.nic.in/wbeco/EROLLS/PDF/English/A001/a0010105 .pdf Cells(k, 1) = folderstring Cells(k, 2) = folder Cells(k, 3) = filestring Cells(k, 3) = URL k = k + 1 Next j Next i End Sub plz define it

0 Answers  


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

0 Answers  






1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?

0 Answers  


am giving to one number u can set into that in date format.u can use any methods

1 Answers   HP,


How to find arry size in qtp vb script

2 Answers   Cap Gemini,


How to load vbs functions in qtp

2 Answers  


What is select case statement?

0 Answers  


which is the bset training centre to learn automation tools?

2 Answers  


plz give ans to this in vb script........ "krishna radha" i want to print this string "Radha Krishna" like this

5 Answers  


Categories