fork download
  1. Module loops
  2. Sub Main()
  3. ' local variable definition
  4. Dim i, j As Integer
  5. For i = 2 To 100
  6. For j = 2 To i
  7. ' if factor found, not prime
  8. If ((i Mod j) = 0) Then
  9. Exit For
  10. End If
  11. Next j
  12. If (j > (i / j)) Then
  13. Console.WriteLine("{0} is prime", i)
  14. End If
  15. Next i
  16. Console.ReadLine()
  17. End Sub
  18. End Module
Success #stdin #stdout 0.03s 28432KB
stdin
Standard input is empty
stdout
2 is prime
3 is prime
5 is prime
7 is prime
11 is prime
13 is prime
17 is prime
19 is prime
23 is prime
29 is prime
31 is prime
37 is prime
41 is prime
43 is prime
47 is prime
53 is prime
59 is prime
61 is prime
67 is prime
71 is prime
73 is prime
79 is prime
83 is prime
89 is prime
97 is prime