Write VB script to test given number is Prime Number
Answer Posted / apoorva
bresult = False
Num = 907
For i = 2 To Num / 2
If Num Mod i = 0 Then
bresult = True
Exit For
End If
Next
If bresult = True Then
MsgBox "Prime"
Else
MsgBox "Not Prime"
End If
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What are the advantages of Object Repository?
1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?
How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet
How to save your test using quicktest professional (qtp)?
How can you write the scripts that operate on different objects depending on run-time information?
How would you export a script from one pc to another in qtp?
Is it possible to call win runner script in qtp?
Can any one tell me about "Mapping Repository Parameter Values" and why we use it....??How to use it???Please, tell the preconditions also...........???? Thanks in Advance
Object repositories types, which and when to use?
What r the different filters in defect in quality center
What is the use of an object spy tool in qtp?
Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?
if our qtp vb Script may be Currepted then What we want do?
Is it possible to change the property value at runtime? How it is possible?
Explain the concept of object repository and how quicktest professional recognises objects?