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 / manu
x=inputbox("enter a number")
prime = TRUE
for i = 0 to x-1
if x mod 2 = 0 then
prime = FALSE
end if
next
if prime then
msgbox "prime number"
else
msgbox "not prime"
end if
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Mention what is vbscript procedures?
write a function to read the items from combobox of Flight reservation & save in excel (QTP)??
Mention what is the use of option explicit in vbscript?
What is the use of the recordset object and which statement is used to create such an object?
Explain the arrays in vb script?
Mention the rules for using option explicit statement?
Explain about constants in vb script?
Mention when to use function procedures and what are its characteristics?
Write a Script for ATM in QTP
How will you get the natural logarithm of the given number in vbscript?
What is the difference between for loop and while loop?
I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..
Mention the environments where vbscript could be run?
What are class events?
what do you mean .ota mobile format