Hi, Anybody could you Please tell me How to write the
script for Checking whether given number is Prime Number or
not..Thanks in Advance
Answer Posted / pankaj jaju
Function IsPrime(Num)
Dim varNum, varCtr, varLimit
varLimit = Round(Num/2)
For varCtr = 2 To varLimit
varNum = Num Mod varCtr
If varNum = 0 Then
IsPrime = False
Exit For
End If
Next
If varCtr >= varLimit Then
IsPrime = True
End If
End Function
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
I need to get some data from data base and store this
(retrieved) data in a excel sheet using VB script in QTP9.0
I have created connection for data base
I have created as excels sheet by using
Set XL=CreateObject("Excel.Application")
XLworksheet.cells(1,1).value= rs.fields.item("<
What is vbscript?
Explain a few date functions in vbscript
Mention what is the use of option explicit in vbscript?
How to get the length of the string by making use of the string function?
Anyone have qtp11.0 crack?
How are arrays declared in the vbscript language?
Explain about the support of asp for vb script functionality?
how to increasing the numbers in a given text box please write a vb script
How regexp.execute method works?
Explain the extension .hta?
What are the rules to name variable in vbscript?
how to operate webobjects in a webpage using getobject function and then using generic methods?
Explain about vb script?
Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?