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 does vb script help in web page designing? explain with example.

1950


How can you create a file object to work with the files in the vbscript language?

915


Hi this is Vinoth. I need a help on below mentioned question A combobox contains list of items assume as 5 I have to get each items Individually and I have to Export to datatable. Please help me on this. Thanks

2097


How will you get a subset of a array in vbscript?

967


how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me

14076


How strcomp function works?

1031


What are subprocedures in vbscript?

1067


How will you compare two strings in vbscript?

1015


Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?

965


In the Web page we have a table link, if we click on that link all the contents under that link will be sorted (asscending/Descending). Now i want to check in which order the list is ? for that i need to get the data in to some var How can i get that cells data?

2430


What are the environments supported by vbscript language?

882


What purpose does ‘on error resume next’ serves?

1020


Explain what is loose binding? Why is it not a good practice to use it?

1035


When are redim statement and preserve keyword used in the vbscript language?

997


A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.

1899