Example #1
0
        public static void Problem5()
        {
            int n = 1;

            while (true)
            {
                if (CustomMath.IsDivisibleForEachN(n, 20))
                {
                    break;
                }

                n++;
            }
            Console.WriteLine(n); //returns smallest number which can be divided by every natural number up to 20
        }