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
Which data type/types are supported by vbscript language and what are their specialties?
Mention what is the difference between vbscript and vba?
what is diff between static and dynaic arrys?
What is the use of option explicit statement?
Mention what is select case statement?
In the Web page we have a table link, if we click on that link all the contents under that link will be sorted (asscending/Descending). Now i want to check in which order the list is ? for that i need to get the data in to some var How can i get that cells data?
Explain vbscript in detail?
Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?
What purpose does ‘on error resume next’ serves?
What is the difference between for loop and while loop?
Mention what is the technology used by vb script?
What is the use of option explicit in vbscript?
Explain sga memory structures?
how does vb script help in web page designing? explain with example.
How will you get a subset of a array in vbscript?