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 / nisar
Dim i,num
num=CInt(InputBox("Enter the numbers to limit the
Prime:"))
i = 3
While i <= num
bIsPrime = True
j = 2
While j <= i\2 And bIsPrime
bIsPrime = i Mod j > 0
j = j + 1
Wend
If bIsPrime Then
Wscript.echo("Found a prime number: " & i)
End If
i = i + 2
Wend
| Is This Answer Correct ? | 0 Yes | 7 No |
Post New Answer View All Answers
Is vbscript a case-sensitive or case-insensitive?
What are the data types supported by vbscript?
Which operator can be used to check if two numbers are equal or not in vbscript?
Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder
What is vbscript procedures?
write a program to display configuration of a local system with the help of vb script.
can anyone send me a vb scripts code for clicking on a link and coming back on home page again does the same for many links on a web page.
What are the uses of vb script?
Explain about the support of asp for vb script functionality?
What is the difference between vbscript and vba?
How regexp.execute method works?
Explain about tristate constants in vbscript?
why do u choose to go for testing why cant for devoloping
What are the different types of loops available in the vbscript language?
What is sql loader? Explain the files used by sql loader to load file?