Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     if (args.Length > 0)
     {
         string sizeStr = args[0];
         int size = Int32.Parse(sizeStr);
         Sieve sieve = new Sieve();
         PrimeType[] types = sieve.Eratosthenes(size);
         PrintResult(types);
     }
     else
     {
         Console.Error.WriteLine("Please provide the size of the sieve");
     }
 }
Ejemplo n.º 2
0
 static void Main(string[] args)
 {
     if (args.Length > 0)
     {
         string      sizeStr = args[0];
         int         size    = Int32.Parse(sizeStr);
         Sieve       sieve   = new Sieve();
         PrimeType[] types   = sieve.Eratosthenes(size);
         PrintResult(types);
     }
     else
     {
         Console.Error.WriteLine("Please provide the size of the sieve");
     }
 }