write a vb script to calculate factorial of a number?
Answer Posted / raja
Dim n,f
n=inputbox("enter a number")
f=1
If n<0 Then
msgbox "invalid number"
else if n=0 or n=1 then
msgbox "the factorial of given number is : "& f
else
For i=1 to n
f=f*i
Next
msgbox "the factorial of given number is : "&f
End If
end if
| Is This Answer Correct ? | 77 Yes | 19 No |
Post New Answer View All Answers
Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar
What is Procedure or Subroutine in VB Script?
Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards
How to throw an error in vbscript?
What are the uses of vb script?
What are class variables?
How will you compare two strings in vbscript?
Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?
I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..
What is vbscript language used for and which earlier language is it modeled upon?
what is the difference between modular and data and keyword driven framework
What are events in the vbscript language?
Can someone please tell me what poor design in a relational database (not the layout or style) is and how it can be avoided? PLEASE...im desperate.
Mention how to access array data?
Mention how you can call vbscript functions?