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
after medical test,when will be the police verification
What are the environments supported by vbscript language?
Mention what if you do not specify anything when you call a procedure?
Explain about scrrun.dll in vbscript?
What is the difference between VBScript and JavaScript?
Which operator is used to perform the comparison among 2 operands in the vbscript language?
How many types of procedures are available in the vbscript language?
What are class events?
What is sql loader? Explain the files used by sql loader to load file?
How to create a cookie using vbscript?
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
What are class properties?
Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar
Explain about adodb.stream class?
What is the extension of the vbscript file?