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
Out of the different type of operators, which are evaluated first and last in the vbscript language?
How will you convert a string to upper case string using vbscript?
filter the array values without using filter function?
Explain some uses of vb script?
Explain about scrrun.dll?
What is the use of the recordset object and which statement is used to create such an object?
What are the uses of vb script?
What is the use of the formatdatetime function in the vbscript language?
How will you get the octal value of the given number in vbscript?
how to comvert 120 into one hunderd twenty rupees only and vice varsa
i have a problem with this error(this error related edit and
delete button,when i click this button in datagrid..i will
get this error)"Invalid postback or callback argument.
Event validation is enabled using
Which data type/types are supported by vbscript language and what are their specialties?
How are values assigned to string type and numeric type variables?
What is byref and byval parameters in vbscript?
How to Import data from a file (file is on the desktop) to the data table