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...

Write VB script to test given number is Prime Number

Answer Posted / vijay kumar

Dim n
count=0
n=inputbox("enter a number")
For i=2 to n-1
If n mod i=0 Then
count=count+1
End If

Next
If (count/2)<> 0 Then
print "given number is normal number"
else
print "given number is prime number"
End If

Is This Answer Correct ?    42 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to delete an object from the object repository?

1038


what is the diff b/w assistive and mandatary rules of object repository in QTP???

2131


how to acess a test in RSA?

2162


How did you resolve conflicts present in Object Repository?

2059


What is ObjectParamater?

1949


Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this

2464


Why script error occur in between recording in qtp?

2221


Describe function procedure in vbscript.

1060


how to test Web application using QTP software

1963


What is an object repository?

998


What is action split and the purpose of using this in qtp?

968


What is Associate Repository in QTP 9.2 ?

968


Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji

1332


If I change the property value at runtime is it effect is object repository?

1030


If created one virtual object? Next time I changed the window position will it work?

992