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 / mudaseer
vnum=inputbox("enter the number")
for i=2 to vnum-1
if(vnum mod i)=0 then
vf="no"
exit for
else vf="yes"
end if
next
if vf="no" then
msgbox "not a prime"
else
msgbox "it is a prime"
end if
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
How do you declare a variable in vbscript?
Can someone please tell me what poor design in a relational database (not the layout or style) is and how it can be avoided? PLEASE...im desperate.
Write a Script for ATM in QTP
How should i Create Email invite with server-side Coding?
What is the technology used by vb script?
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.
How do i automate a website www.flyashx.com without having any test cases witin a week time.
Explain How do you create a recordset object in vbscript?
Which loop is used in case of arrays in the vbscript language?
Mention what is variant in vbscript?
regular expression that will recognize a browser as long as its name property starts with mybrowser
Which function is used to perform string comparison?
How can you create an object in vbscript?
did any one attended interview in applabs if you had gone through plz tell me the procedure
Mention what is select case statement?