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
while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans
1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?
Mention what is variant in vbscript?
What are the uses of vb script?
What is the difference between do until loop and do while loop?
give me any information abou vb script books learn quckly
if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.
By default in vbscript the arguments passed to functions and subroutines are by reference or by value?
Differentiate javascript and vbscript?
What are the environments supported by vbscript language?
Explain about .wsf files?
How to create a cookie using vbscript?
How are values assigned to the variables in the vbscript language?
Give me sm ideas to write Vbscripts abt protocol testing abilash700@gmail.com.
Which operator can be used to check if two numbers are equal or not in vbscript?