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 / venkat ramana reddy
f=0
msgbox "Enter number"
a=inputbox("enter a no")
For i=1 to a
reminder=a mod i
If reminder=0 Then
f=f+1
End If
Next
If f=2 Then
msgbox "the entered number is prime:"&a
else
msgbox "the entered no.is not prime:"&a
End If
| Is This Answer Correct ? | 19 Yes | 4 No |
Post New Answer View All Answers
What is vbscript language used for and which earlier language is it modeled upon?
What are the advantages of vbscript?
Which operator can be used to change the value of the operand or change the state of the condition?
How can you fetch the value of a cookie?
Mention what is the main difference between function and sub-procedure?
What are class properties?
PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com
1. How to handle object implementation change in DP for Ex: i have login page with username,pasword (editboxes),login,cancel(buttons). Here i written DP code for login page with the help properties. My questions: 1.If properites are changing dynamically i will do (i want code for that) 2.if objects are changed dynamcally i will do (i wnat code for that)
What is the difference between vbscript and vba?
What are the different types of loops available in the vbscript language?
How you can call vbscript functions?
What are the properties of regexp object?
How do i automate a website www.flyashx.com without having any test cases witin a week time.
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......
How to open browser in vb script?