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

can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?

0 Answers   Sapient, Satyam, TCS,


what is virtual object?

2 Answers  


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

1 Answers  


How to test background color and dynamic images which are moving during runtime?

7 Answers   CTS,


LINUX environment supports QTP or not? LINUX environment supports QC or not?

4 Answers  


Explain about merging of two repositories?

3 Answers  


How you can make an action as re-usable action?

0 Answers  


What is object spy in quicktest professional?

0 Answers  


What is the XML file architecture ?

0 Answers  


I have a Webedit object. some text is entered in that object I want to know the font sixe of that text.How could I do this using QTP? This is a requirement for me. I am happy if any one help on this

3 Answers   GE,


i did B.Tech cse and i secured 76%. instead of siting at home ... i would like to do some course. can u suggest me in this.

1 Answers  


how can we return a value from userdefined function for eg 2 functions in func1 iam getting 2 values(a,b) and storing in var(C). now i want to pass that var(c) to another func2 give me the script

1 Answers  


Categories