11-11-2009, 05:13 PM
Code:
For x = 3 To 200 Step 2
bIsPrime = True
For y = 2 To x\2
bIsPrime = x mod y > 0
If Not bIsPrime Then Exit For
Next
' check if the bIsPrime returns true if yes then it is prime.
If bIsPrime Then
document.writeln("Found a prime number: " & x)
End If
Next
by the way did you google it?