Write VB script to test given number is Prime Number
Answer Posted / vijay kumar
Dim n
count=0
n=inputbox("enter a number")
For i=2 to n-1
If n mod i=0 Then
count=count+1
End If
Next
If (count/2)<> 0 Then
print "given number is normal number"
else
print "given number is prime number"
End If
| Is This Answer Correct ? | 42 Yes | 14 No |
Post New Answer View All Answers
How to delete an object from the object repository?
what is the diff b/w assistive and mandatary rules of object repository in QTP???
how to acess a test in RSA?
How did you resolve conflicts present in Object Repository?
What is ObjectParamater?
Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this
Why script error occur in between recording in qtp?
Describe function procedure in vbscript.
how to test Web application using QTP software
What is an object repository?
What is action split and the purpose of using this in qtp?
What is Associate Repository in QTP 9.2 ?
Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji
If I change the property value at runtime is it effect is object repository?
If created one virtual object? Next time I changed the window position will it work?