using System; using System.Collections.Generic; using System.Text; namespace Euler5 { //What is the smallest number that is evenly divisible by all of //the numbers from 1 to 20? class Program { static void Main(string[] args) { long n = 20; bool bFound = false; long current = n-1; long bigger = 0; while (!bFound) { current++; for (int i = 2; i <= n; ++i) { if ((current % i) != 0) break; if (i == n) { Console.WriteLine("Found: " + current); Console.ReadLine(); } } } } } }