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  


why we are using environment variables instead of global variables?

1 Answers   TCS,


I want to install qtp software in my system, My operating system is vista . Anybody please suggest me how to get QTP software with licence key

2 Answers  


Write a script to customize the test results in PDF and HTML format.

0 Answers   DuPont,


Diff b/w Test Design and Test case design? What is the Design Review's and Code Review's. When will you conduct tese reviews?

1 Answers  


How to test the login page in different ways in automation testing and i need code?

0 Answers   Cognizant,


What is text check point and text area check point?

0 Answers  


i have batch scripts in qtp and i want to update the status like pass/fail in excel sheet after excecuting the every script in batch.how to write the script for this?

1 Answers   IBM,


when I was doing the web testing with QTP using with standard checkpoint the Object selection -checkpoint properties dialog box not displaying pages and links hierarchical order. Could you please tell me. thanks

0 Answers  


What is the entry and exit point of automation testing

2 Answers   Infosys,


Where you can store check point results?

3 Answers  


In our application (Web based application)we will get a pdf file and we have check a particular text in that pdf. Can any one tell how to check text in a pdf file. In the same pdf file it generating some links and I have to click that links. QTP unable recognizing that links, even id did record and playback qtp does not generating any script. Can any one help me….?

6 Answers  


Categories