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
Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?
what is the hierarchy to use properties in descriptive programming
If I give some thousand tests to execute in two days what do you do?
How qtp recognizes the object?
How many types of parameters are there?
What are the different types of recording modes in qtp? Which will be used when?
How do I get the QTP scripts result in xml format by using vb script function?
I want two test two agents login for the flight website. Here is the scenario: I want to go through 1-3 rows for one user login and other user login I want to go though 3-5 rows. How would you set this up in qtp. Thank You
Explain in brief about the qtp automation object model (aom).
How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?
what is the difference between development and testing
How often were they executed?
How do Parameterization and Data-Driving relate to each other in QTP?
What are the different types of functions available in qtp and explain ?
I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.