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
How to take whole text output from screen of Bitmap Application.
What is the difference between a dictionary and an array?
Mention what if you do not specify anything when you call a procedure?
Explain the support of asp for vb script functionality?
how to check whether link is disabled in QTP??
What are keywords in the vbscript language?
Which command is used for writing text on a page?
Hi this is Vinoth. I need a help on below mentioned question A combobox contains list of items assume as 5 I have to get each items Individually and I have to Export to datatable. Please help me on this. Thanks
How will you get a combined string from array of string in vbscript?
How to declare an array in vbscript?
Which function allows you to instantiate an object given its programmatic identifier or progid?
Out of the different type of operators, which are evaluated first and last in the vbscript language?
How will you reverse a string in vbscript?
Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.
what is the use of QCUtil? explain with one example?