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 is sql loader? Explain the files used by sql loader to load file?
Illustrate briefly about the different types of statement
How can you create a file object to work with the files in the vbscript language?
How to write functions and sub in vb script?
how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me
Mention how to create a cookie using vbscript?
How do you declare a variable in vbscript?
Anyone have qtp11.0 crack?
What are the different types of loops available in the vbscript language?
How you can call vbscript functions?
what is the object hyrarchy in QTP for a web based application
What are the valid scopes of a variable in vbscript?
How will you convert a string to lower case string using vbscript?
Explain sga memory structures?
Which function is used to perform string comparison?