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

Could Anybody tell me VBScript for
Check if a given number is Prime number-Don't use any Built-
in Functions Boolean/int is Prime(int number).. Thanks in
advance.

Answer Posted / venkat ramana reddy

f=0
msgbox "Enter number"
a=inputbox("enter a no")
For i=1 to a
reminder=a mod i
If reminder=0 Then
f=f+1
End If
Next
If f=2 Then
msgbox "the entered number is prime:"&a
else
msgbox "the entered no.is not prime:"&a
End If

Is This Answer Correct ?    19 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is vbscript language used for and which earlier language is it modeled upon?

970


What are the advantages of vbscript?

1045


Which operator can be used to change the value of the operand or change the state of the condition?

989


How can you fetch the value of a cookie?

985


Mention what is the main difference between function and sub-procedure?

1005


What are class properties?

1123


PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com

2093


1. How to handle object implementation change in DP for Ex: i have login page with username,pasword (editboxes),login,cancel(buttons). Here i written DP code for login page with the help properties. My questions: 1.If properites are changing dynamically i will do (i want code for that) 2.if objects are changed dynamcally i will do (i wnat code for that)

2073


What is the difference between vbscript and vba?

1081


What are the different types of loops available in the vbscript language?

947


How you can call vbscript functions?

1041


What are the properties of regexp object?

1058


How do i automate a website www.flyashx.com without having any test cases witin a week time.

1871


wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......

1860


How to open browser in vb script?

1172