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 is ObjectParamater?
What is the Difference between test object and run time object?
If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?
What is the use of ordinal identifier in qtp?
what are the challenges you have faced while testing web based application using the automation tools ?
Explain the checkpoint in qtp?
How do you create new test sets in td?
Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji
What is QTP scenario.
How to record a qtp script ?
Hi all, I am using windows vista, I am in the process of learning QTP. When ever I try to work with insert mode in flight application , i am getting the error of 'Operation must use an update table query, fractional truncation(null) error. Can anyone help me regarding this?
How can you pass value one action to another action?
I am a new tester that needs to create an automatic script involving security questions. On a webpage I need to select a security question(which are random) from a drop down menu, and then input the answer as the last word from the security question. I have the script set-up to automatically select the first security question from the drop down. The problem I am having is trying to insert the security answer. How do I insert the security answer based on the selection from the security question?
Explain the new feature of UFT regarding the export of test results?
Define Error Pane of UFT?