// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; namespace E { class MainClass { public static void Main(string[] args) { int n = 0; int i = 2; while(n < 100) { bool prim = true; for(int j = 2; j <= (int)Math.Sqrt(i); j++) { if(i % j == 0) { prim = false; break; } } if(prim) { Console.WriteLine(i); n++; } i++; } } } }