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
What methods are used to create text files and open text files in the vbscript language?
What are events in the vbscript language?
Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.
Can automation testing find ssame no. of bugs what we can find by manual testing?
What is the purpose of drive object of scripting.filesystemobject class in vbscript?
Explain about scrrun.dll in vbscript?
How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.
how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.
How are values assigned to the variables in the vbscript language?
How will you convert a string to lower case string using vbscript?
What is the difference between vbscript and vba?
What are string functions in vbscript?
Mention how to create a cookie using vbscript?
Which constant is used for print and display functions and works as same as pressing enter key?
Is vbscript a case-sensitive or case-insensitive?