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
What is a data driven test in qtp?
What is the architecture of your project? Can any one answer for this question plz........
How can you write the scripts that operate on different objects depending on run-time information?
How to run a test using quicktest professional?
Explain the new feature of UFT regarding the export of test results?
Can you brief the hurdles you faced during Automation testing?
What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?
If I am scripting Web-based Surveys using QTP that open up differently but at the exact same point require a username and password can I automate that username and password for all the surveys some how using QTP?
What are the different types of recording modes?
What is the basic concept of quicktest professional?
How many types of parameters are available in quicktest professional?
What is the file extension of the code file and object repository file in QTP?
When you open QTP, how many sheets you can see?
assume i have few url link how will i dynamically call then using descriptive programming?
In application which areas to be automated and what kind of situation will be take? using QTP? Plz give me the clear answer