Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to find if given number is prime or not



How to find if given number is prime or not..

Answer / vishnu

flag = 1

n=cint(inputbox("Enter a number to find whether it is Prime
or Not"))

For i=2 to (n-1)
If n mod i = 0 then
flag = 0
Exit for
End if
Next

If flag = 1 then
msgbox "Yes! It is a Prime number"
Else
msgbox "No! it is not a prime number"
End if

Is This Answer Correct ?    8 Yes 0 No

Post New Answer

More QTP Interview Questions

Which Databases supports for QTP?

2 Answers  


How to use actions in qtp ?

0 Answers  


Anybody explain me, the concept of checkpoint declaration in the QTP mainly for the Objects, Pages, Text and Tables ?

1 Answers  


What are the Features & Benefits of Quick Test Pro (QTP)..?

5 Answers  


In a WebTable 2nd row,3rd column contains one link and that link name is changing dynamically. How you will click the link?

1 Answers   Bank Of America,


What is a data driven test in qtp?

0 Answers  


In QTP I have a parameter in a datatable that is a sentence. I need to take the last word from the sentence and enter it into a field in a web application. How can I setup a parameter to enter in just a portion of the parameter (last word of the sentence) instead of the entire paramater (whole sentence).

2 Answers  


Hi guys, Please suggest some thing these points are correct???, Is UFT 12 and QTP outdated ??? and also VBscript is also deleted/Removed from QTP ???? Javascript is added latest and tool name is called JFT ??? From this year ??

2 Answers  


How to export quicktest professional results to an .xls file?

0 Answers  


hai friend's .. my question is a[0]=I a[1]=N a[2]=D LIKE IT GO'S i need output INDIA ,using simple string how will u do? can any one tell really need full..

4 Answers   Mind Tree, Tech Mahindra,


how to re-install QTP 9.0 trial version.

25 Answers  


Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime. suppose i wrote datatble.value(1) = "Test data" so when i run the script it says column(1) doesn't exist. Then i write something in column A1 manualy and run the script again. Now it works fine. Pls clarify how i can put value in blank cell of datatable.

10 Answers   Apex,


Categories