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
Which operator is used to perform the comparison among 2 operands in the vbscript language?
I want to run QTP script on Linux server is it possible to do this by connecting Windows to Linux through VPN/Terminal Server and just run the script on Linux server.
Which operator can be used to do an xor operation in vbscript?
Explain the arrays in vb script?
Explain How do you create a recordset object in vbscript?
Which in-built function related to an array joins substrings into one string in the vbscript language?
In what way program "hello world" you can write in vbscript?
How to declare an array in vbscript?
What are the properties of regexp object?
Explain the functionality of vbscript?
Explain about the support of asp for vb script functionality?
What are subprocedures in vbscript?
How to Enter Values on the Command promt using VB script
if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.
When does ‘on click of button’ event gets triggered in the vbscript language?