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
give me the code to save all messages of inbox of gmail into a folder and notepad
How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?
Give me At Least 5 Differences between DOCUMENTATION OBJECT MODEL(DOM)and COMPONENT OBJECT MODEL(COM)? Interviewer said me to WRITE the difference only in points not as you WRITE a paragraph ???? only in points
Did QTP prove efficient for your project? Yes or No, explain?
What contains Data Driven Framework document in qtp?
hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....
Discuss the QTP Environment?
Explain the types of properties that quick test learns while recording?
What is the difference between QTP and WinRunner? Why do you choose only QTP for automation among remaing tools like Rational robot and silk test? Write the VBscript for any functionality in your project ? What is the cost of QTP ? If you entered into yahoo mail with your valid user name then you will get FOR EXAMPLE , " welcome to krishna " on the top of inbo page , how can you test it in QTP? What type of testing you can do, when we gave you 5 screens and how can you test that application? What type of framework you are using in your company and explain it?
How to record application running on the Virtual machine?
What is quicktest professional (qtp window?
Hi All, issue is related to handling pop up script generated in IE, and run on mozilla. In App Under Test, when we get the alert pop ups, we just click ok button. if we need to run the same code on mozilla it will not identify . so we will check browser if browser(*).dialog(IE object).exits browser(*).dialog(IE object).winbutton(OK).click else 'by default mozilla browser(*).dialog(mozilla object).page(*).webbutton(OK).CLICK END IF But my qustion is. Do we write the above piece of code where ever we get such kind of pop ups from the application like alert pop up, confirmation pop up.... OR do we have any other alternative way to do this by using any functions in Recovery Scebarios? If Any of u know idea please do help me in this regard. or send answer to kravimb@gmail.com
There is an built in window application in qtp9.1,i.e.Flight4.0.i want to implement the recovery maneger on it.How can i do this?
What is the difference between the keyword view and expert view?
How you can find length of array in qtp?