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 / naga siva sankar
val=Inputbox("enter any number")valprime=0
For i=2 to Int(val/2)
If (val mod i)=0 Then
msgbox "not a prime number"
valprime=1
Exit for
End If
Next
If valprime=0 Then
msgbox "prime number"
End If
| Is This Answer Correct ? | 37 Yes | 15 No |
Post New Answer View All Answers
i need to sort the data using qtp script for this how i need to write a qtp script
Can someone please tell me what poor design in a relational database (not the layout or style) is and how it can be avoided? PLEASE...im desperate.
What is the difference between a dictionary and an array?
I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?
What is the purpose of the err object in the vbscript language?
can anyone send me a vb scripts code for clicking on a link and coming back on home page again does the same for many links on a web page.
Differentiate javascript and vbscript?
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?
How will you release the memory acquired by an array variable in vbscript?
1.I want to establish connection with excel and also want to fetch the data using SQL queries. 2.the code should be written in such a way that in future if I want to migrate from excel to MS excess database , then there should be minimal changes.
Mention how to create a cookie using vbscript?
How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.
Explain about vb script?
How regexp.execute method works?
Difference between dim,public and private variables in vb script?