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
wht must be the interview question on corinthian information technology solutions incorporated.
Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).
Mention the rules for using option explicit statement?
How will you get a string with the specified character the specified number of times in vbscript?
How should i Create Email invite with server-side Coding?
What is event handling in vbscript?
How are comments handled in the vbscript language?
How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'
Which keyword is used to declare a variable in the vbscript language?
Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji
What are the naming conventions while declaring a variable in the vbscript language?
Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?
give me any information abou vb script books learn quckly
In html file what is an ideal position to include vbscript?
What is the use of option explicit statement?