Hi, Anybody could you Please tell me How to write the
script for Checking whether given number is Prime Number or
not..Thanks in Advance
Answer Posted / anwar basha
n=cint(inputbox("enter the number"))
if n=0 then
msgbox " invalid no"
end if
flag=0
for i=1 to n-1
if n mod i =0 then
falg=1
end if
exit for
next
if falg=1 then
msgbox "not a prime num"
else
msgbox "prime no"
end if
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Compare java script and vb script?
How to open a file. What is the perpose of true and false mode there?
Which function is used in the vbscript language to convert the specified expression into a date type value?
What are the environments supported by vbscript language?
Mention what are the rules to name variable in vbscript?
Can anyone send me a vb script function for verifying the functionality of active links on a web page
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
What is select case statement?
how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.
Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com
How to replace junk code recorded by QTP with a mall function.
HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.
after medical test,when will be the police verification
Explain about the support of asp for vb script functionality?
What are class events?