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
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.
Out of the different type of operators, which are evaluated first and last in the vbscript language?
How will you get a subset of a array in vbscript?
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
What is the difference between for loop and while loop?
Does VB/Win make standalone .EXE files?
What is the purpose of drive object of scripting.filesystemobject class in vbscript?
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.
Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository
When does ‘on click of button’ event gets triggered in the vbscript language?
Differentiate javascript and vbscript?
give me any information abou vb script books learn quckly
what is diff between static and dynaic arrys?
How should i Create Email invite with server-side Coding?
Mention characteristics of sub procedures?