Write VB script to test given number is Prime Number
Answer Posted / kishore
Dim n
count=0
n=inputbox("enter a number")
For i=2 to n-1
If n mod i=0Then
count=count+1
End If
Next
If count>3 Then
print "given numer is normal number"
else
print "given number is prime number"
End If
| Is This Answer Correct ? | 31 Yes | 37 No |
Post New Answer View All Answers
What are metrics and matrix?
Where is the resultset of a sqlquery (which is fired by rsobj.open sqlquery,xxxx,xxxx) stored ?
Have you faced any problems with object repository?
What is environment variable in qtp and why to use it?
ACTUALLY I AM WORKING IN THE DISTRIBUTION DOMAIN.MY COMPANY IS PROVIDING DISTRIBUTION SOFTWARE FOR PHARMA AND FMCG DISTRIBUTORS.HERE I AM USING QTP 9.2.HERE IN MY APPLICATION WHILE RECORDING ONE WINDOW APPEARS.IN THAT I CAN SELECT THE ITEM OR NO NEED TO SELECT.BUT WHILE RUNNING THE SAME SCRIPT THE WINDOW MAY NOT APPEAR OR APPEAR.HOW TO WRITE SCRIPT FOR THIS
Where we can use the synchronization?
What are the challenges you faced during you entire life automation ?
how to download mercury qtp9.2 ny internet ?
Is any limitation to xml checkpoints?
What will be happen if i load object repository at run time, but it has already associated.
Can anyone pls tell me in realtime (descriptive programming) how will the properties of the object be given to the test team. R they given in an excel sheet and is the same sheet also given to the development team and by whom is this given? Thanks a lot.
What are the benefits of qtp?
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...
How many types of recording modes in qtp?
How will you report the bug and explain the defect tracking sheet you handled?