static void Main() { BigInteger answer = 0; int search = 10; BigInteger max = 0; EAsContFraction e; for (int a = 1; a < search; ++a) { e = new EAsContFraction(a); e.print(); Console.WriteLine(); Pair p; p = e.toRational(); Console.WriteLine(p.a + "/" + p.b); Console.WriteLine(Permutator.sumOfDigits(p.a)); } e = new EAsContFraction(99); Pair p2 = e.toRational(); answer = Permutator.sumOfDigits(p2.a); Console.WriteLine("Answer: " + answer); // Keep the console window open in debug mode. Console.WriteLine("Press any key to exit."); Console.ReadKey(); }