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
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.
How can you create a file object to work with the files in the vbscript language?
Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji
What is variant in vb script?
how to check whether link is disabled in QTP??
how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me
What is dictionary object in vbscript? Explain?
How will you get the smallest subscript of an array in vbscript?
When are redim statement and preserve keyword used in the vbscript language?
Why to use option explicit in vb script?
Mention how you can call vbscript functions?
Mention how to create a cookie using 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.
Explain the scope of the variables using dim, public, and private keywords respectively.
Can automation testing find ssame no. of bugs what we can find by manual testing?