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

Hi, Anybody could you Please tell me How to write the
script for Checking whether given number is Prime Number or
not..Thanks in Advance

Answer Posted / manu

x=inputbox("enter a number")

prime = TRUE
for i = 0 to x-1
if x mod 2 = 0 then
prime = FALSE
end if
next

if prime then
msgbox "prime number"
else
msgbox "not prime"
end if

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a function in vbscript?

1244


Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?

1015


who will create the object?

1972


hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?

2351


What is Procedure or Subroutine in VB Script?

1157


does anyone have qtp11.0 license key.Please sendit to my mail id-rrvv2011@gmail.com...Thanks

2948


What is the difference between for loop and while loop?

1074


Explain about filter expression?

1008


Mention how you can call vbscript functions?

1143


How will you get the last occurrence of one string within another string using vbscript?

1197


What are the advantages of vbscript?

1093


How to write a VBscript for web page performance test i need a code send if any knows the code If any knows VBScript book plz send to me the link to my mail plz

2878


Both Static and dynamic arrays are handled by VB script. Is it true?

1091


write any ttest cases using check points and parameterization

2290


How you can call vbscript functions?

1097