diff --git a/ProjectEuler/C++/Problem12.cpp b/ProjectEuler/C++/Problem12.cpp index 2436a81..30ab552 100644 --- a/ProjectEuler/C++/Problem12.cpp +++ b/ProjectEuler/C++/Problem12.cpp @@ -6,7 +6,6 @@ #include -#include //For fmod #include //For the timer @@ -50,7 +49,7 @@ unsigned long countDivisors(unsigned long number){ for(int cnt = 1;cnt * cnt < number;++cnt){ //Check if the counter evenly divides the number //If it does the counter and the other number are both divisors - if(fmod((double)number, (double)cnt) == 0){ + if((number % cnt) == 0){ numDivisors += 2; } }