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 the purpose of the err object in the vbscript language?
Mention how to create a cookie using vbscript?
Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.
I need to get some data from data base and store this
(retrieved) data in a excel sheet using VB script in QTP9.0
I have created connection for data base
I have created as excels sheet by using
Set XL=CreateObject("Excel.Application")
XLworksheet.cells(1,1).value= rs.fields.item("<
Which event is triggered when mouse focus comes out of an element in the vbscript language?
how to increasing the numbers in a given text box please write a vb script
write any ttest cases using check points and parameterization
What are subprocedures in vbscript?
Mention what is the difference between vbscript and vba?
How will you convert a given number to long in vbscript?
Is vbscript language a case-sensitive language and what does it mean?
Which constant is used for print and display functions and works as same as pressing enter key?
how to set one column as primary key in QTP and fetch values accordingly
Can automation testing find ssame no. of bugs what we can find by manual testing?
When to use function procedures and what are its characteristics?