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
How many types of recording modes are there?
Approach for Installation,comaptibility,system testing
What are the different types of qtp test assets and their extensions?
What is reusable action?
Where is the resultset of a sqlquery (which is fired by rsobj.open sqlquery,xxxx,xxxx) stored ?
Where is the Bitmap checkpoint information stored?
how to test use the quality control .how to verify the image verification
What is the new version of qtp which is recently released in the market?
what QTP Options do you know?
I had installed QTP 9.2. It is working fine but whenever I open QTP, it is trying to reinstall the below-mentioned files again and again "QTP92PS82UPGRADE.exe", "recogn.dll". If anybody has these files, please provide those files in this site or you can send that files to my mail id also (lravi4u@yahoo.com). If you don't know where the files will be in the QTP, search in the QTP software CD or path of QTP program installed (C:\Program Files\Mercury Interactive\QuickTest Professional)
Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)
How to test background color and dynamic images during run time can you put the check point for moving objects?
How the exception handling can be done using quicktest professional?
how will you check how many members visited the website www.infosys.com?
Where should i find checkpoint and virtual objects's Object properties and values in the QTP 9.2 Means where checkpoints or virtual objects related data will store If i want to get the runtime object properties how can i use Getroproperties on Checkpoints