fork(2) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. for (int i = 2; i < 200; i++)
  8. {
  9. bool isp = true;
  10. for (int j = 2; j <= Math.Sqrt((double)i); j++)
  11. {
  12. if (i % j == 0)
  13. {
  14. isp = false;
  15. break;
  16. }
  17. }
  18. if (isp) Console.WriteLine(i);
  19. }
  20. }
  21. }
Success #stdin #stdout 0.04s 23920KB
stdin
Standard input is empty
stdout
2
3
5
7
11
13
17
19
23
29
31
37
41
43
47
53
59
61
67
71
73
79
83
89
97
101
103
107
109
113
127
131
137
139
149
151
157
163
167
173
179
181
191
193
197
199