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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John

2544


Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B

3313


What is the file extension of the code file and object repository file in QTP?

1039


What is the file extension of the code file in qtp?

932


What are benefits of qtp?

1049


What is the use of "New Property" in "Add properties" of testobject properties in object repository. How can i use "New properties" while writing scripts if i have assign some values to the testobject properties Can anyone help me? plz

1935


how can we do the frame work in qtp

1987


I need to obtain the parent of an object programatically, so if I have: winButton("aButton") I need to obtain the parent part: window("Window1").Dialog("Dialog1") so I can programatically create a string of the full name of the object to call it with an execute statement in QTP I would like to use something like: part[1] = "window(""Window1"")" part[2] = "dialog(""Dialog1"")" so I can do: exeLine = part[1]&"."&part[2]&"."&"winButton(""aButton"")" Execute exeLine Apart from keeping a record of the window/dialog hierarchy is there a parent or path function/ command Thanks Adrian

1989


How to find array size in qtp?

951


Hybrid framework supports Descriptive programming. Is it true?

1099


what are the issues we will get when there is migration from QTP 8.2 to QTP 10.0? Is there any problem in executing scripts of 8.2 on 10.0?

1841


How to give a call to another action from one action?

1055


For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?

976


What is the difference between call to existing action and copy of an action?

1044


What are parameterizing tests?

967