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

How exactly you start scripting in QTP? In the interview he was not satisfied with my answer.Please post what is correct answer.

5 Answers  


Hello! i am having two comboboxes.Each having 10 items in it.when i select first item in first combobox,it is not similar in the second combobox.for ex in first combo if it is Hyderabad,in second it should be some chenai or some other item .Write a VBSCRIPT for that?

3 Answers   Tech Mahindra,


How we test web based application by using QTP

0 Answers  


How can we disable popup blocker?

1 Answers  


Why to use descriptive programming?

0 Answers  


Whats the realtime QTP testing process

0 Answers   IBM,


In qtp,how to interact tool & application build?

1 Answers  


how can I read text in browser and export the same into text file?

5 Answers   HP,


What is the limitation to XML Checkpoints?

4 Answers   CTS,


i want 8.2 and 9.2 dacuments plhelp any body sand it to my id sandhyat1@yahoo.co.in

3 Answers   Siloka,


What is the standard timing delay for web based application in qtp?

0 Answers  


How to supress warnings from the "Test results page"?

2 Answers  


Categories