In order to solve the Euler Project problem n°5, I wrote the following program:
class p5
{
const int maxNumber = 20;
static void Main(string[] args)
Well, one thing is that you only have to test even numbers, so start at 0, and increase by 2. this is due to the fact that an even number will never evenly divide into an odd number. you could also start the search at a factorial of 10, so 10*9*8*7..and so on so other words start at 10! which is 3 628 800. that may help run it faster. also on average my speed in C was 10 seconds, so you're code is actually fine.