Write VB script to test given number is Prime Number
Answer Posted / prasanth
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>1 Then
print "given numer is normal number"
else
print "given number is prime number"
End If
| Is This Answer Correct ? | 8 Yes | 15 No |
Post New Answer View All Answers
When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.
In qtp, how you can get the last character from a string?
How to find the path of folder in which the test is saved in qtp?
Hi All, How to get repeated word in string . Thanks Balaji
What are the different types of checkpoints?
Explain the check points in quicktest professional?
Why is action split used by qtp?
If you are testing a web application then what will you test in that application?
I am having major problems with some DB Table Checkpoints I add to my script. I 35 web based applications recorded and each has DB Table Checkpoints insert but only 1 script isn't recognizing the DB Table Checkpoints for some reason. I've checked the DB connections and the info in the Library Functions and still only this one script out of 35 doesn't recognize the DB Table Checkpoints. Can someone please help me figure out why only this one script out of 35 that's hitting the same database is having a problem.
.have you ever written compiled module? if yes , tell me about some of the function that you wrote.
how to do the batch testing in test director using manual testing procedure?
Hi I know two types of testing processes. 1. Reaquirments stage,test design,code review's, Design review's, Test Plan, Test Cases design, test execution, Defect Reporting and tracking, UAT, Signoff. 2.Test Initiation , Test Plan, Test Design, Execution,Bug tracking, UAT, Sign off.
How can you identify the browser and its information using QTP script?
What is recovery scenario manager? When you go for recovery scenario manager?
What is difference between Recording time object identification and Run time (Execution) time.