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 / sayali
Dim prime, n
prime = TRUE
n=cint(inputbox("Enter a number to find whether it is Prime or Not"))
for i=2 to (n-1)
If n mod i = 0 then
prime = False
Exit for
End if
Next
If prime then
msgbox "Yes! It is a Prime number"
Else
msgbox "No! it is not a prime number"
End if
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)
Explain about the support of asp for vb script functionality?
We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?
What are lbound and ubound in the vbscript language?
write any ttest cases using check points and parameterization
How will you get a combined string from array of string in vbscript?
when we use filter funtiom invb script(QTP)
what is the standards used for writing the script in QTP
How to Convert Hex color code to color name in VB Script?
Mention characteristics of sub procedures?
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz
Explain about the functionality of vb script?
who will create the object?
What is the main difference between function and sub-procedure?