Exemplo n.º 1
0
        private static int LengthPrimes(int i, int j)
        {
            int counter = 0;

            while (ExtraNumbers.IsPrime(counter * counter + i * counter + j))
            {
                counter++;
            }

            return(counter);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            List <string> permutations = ExtraNumbers.AllPermutations("7654321");

            foreach (string s in permutations)
            {
                if (ExtraNumbers.IsPrime(int.Parse(s)))
                {
                    Console.WriteLine(s);
                    break;
                }
            }
            Console.ReadLine();
        }