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
How to make professional test report using vbscript code in UFT, which gives us complete analysis of the test.
What is difference between vbscript and vba?
How many types of operators are available in the vbscript language?
Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.
What are string functions in vbscript?
How to Import data from a file (file is on the desktop) to the data table
How will you convert a string to upper case string using vbscript?
Which command is used for writing text on a page?
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
By default in vbscript the arguments passed to functions and subroutines are by reference or by value?
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("<
Explain about scrrun.dll in vbscript?
Which operator is used for fetching the modulus of the 2 numbers in the vbscript language?
Write a Script for ATM in QTP
What is loose binding? Why is it not a good practice to use it?