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

n=inputbox("enter the number")
count=0
for i= 1 to n
if n mod i=o Then
count=count+1
Endif
Next
if count=2 Then
Msgbox "number is prime"
Else
Msgbox "number is not prime"
Endif

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you compare two strings in vbscript?

1015


What are subprocedures in vbscript?

1067


give me any information abou vb script books learn quckly

2120


how to comvert 120 into one hunderd twenty rupees only and vice varsa

2296


Explain about constants in vb script?

984


Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)

3633


Explain about operator precedence in vb script?

1024


Can automation testing find ssame no. of bugs what we can find by manual testing?

1925


Explain the operator precedence in vb script?

1025


Why is the use of exit do or exit for statements within loops discouraged?

992


Explain the extension .hta?

921


Which function is used in the vbscript language to convert the specified expression into a date type value?

892


What are the different types of operators and their order of precedence?

1000


Explain vbscript in detail?

1014


Mention what if you do not specify anything when you call a procedure?

942