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 will you get the last occurrence of one string within another string using vbscript?
Mention what is vbscript?
Explain about the functionality of vb script?
after medical test,when will be the police verification
1. How to handle object implementation change in DP for Ex: i have login page with username,pasword (editboxes),login,cancel(buttons). Here i written DP code for login page with the help properties. My questions: 1.If properites are changing dynamically i will do (i want code for that) 2.if objects are changed dynamcally i will do (i wnat code for that)
What are the properties of regexp object?
Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
give me any information abou vb script books learn quckly
Explain about adodb.stream class?
how to set one column as primary key in QTP and fetch values accordingly
Why to use option explicit in vb script?
what is diff between static and dynaic arrys?
Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository
Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?