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
how does vb script help in web page designing? explain with example.
How can you create a file object to work with the files in the vbscript language?
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
How will you get a subset of a array in vbscript?
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
How strcomp function works?
What are subprocedures in vbscript?
How will you compare two strings in vbscript?
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?
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?
What are the environments supported by vbscript language?
What purpose does ‘on error resume next’ serves?
Explain what is loose binding? Why is it not a good practice to use it?
When are redim statement and preserve keyword used in the vbscript language?
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.