Browse Source

solve problem 5

main
Colin McMillen 11 months ago
parent
commit
30936fa435
  1. 15
      Program.cs

15
Program.cs

@ -97,8 +97,21 @@ namespace Euler {
return largest;
}
static long Problem5() {
for (long test = 20; ; test += 20) {
for (int i = 2; i <= 20; i++) {
if (test % i != 0) {
break;
}
if (i == 20) {
return test;
}
}
}
}
static void Main(string[] args) {
WriteLine(Problem4());
WriteLine(Problem5());
}
}
}
Loading…
Cancel
Save