Example #1
0
        static void Main(string [] args)
        {
            if (args.Length > 0 && int.TryParse(args[0], out var max))
            {
                var esieve = new Sieve();
                var primes = esieve.Generate(max);

                foreach (var prime in primes)
                {
                    Console.WriteLine(prime);
                }
            }
            else
            {
                Console.WriteLine("You must specify max number!");
            }
        }
 static void Main(string[] args)
 {
     Console.WriteLine("NĂºmeros primos menores a 1000");
     Console.WriteLine(Sieve.FindPrimes(1000));
 }