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
What's the difference between vbscript and vb.net?
Which date function is used in the vbscript language to find the difference between the 2 dates?
1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?
How will you compare two strings in vbscript?
please can you help me to get a code of flames using a visual basic 6
What are the different types of operators and their order of precedence?
while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans
What are the differences between sub procedures and function procedures?
How to replace junk code recorded by QTP with a mall function.
Is vbscript a case-sensitive or case-insensitive?
How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.
did any one attended interview in applabs if you had gone through plz tell me the procedure
where can i learn VB scripint ?
Explain the arrays in vb script?
Explain sga memory structures?