percocet
Member
- Oct 21, 2016
- 72
- 16
Hey,
I could ask this on stackexchange or just straight up find the answer online, but what fun would that be. Plus this is an opportunity to get to know everybody in the community.
So i've decided to try the projecteuler problems again (this time in java, not python) and am having trouble. Hopefully someone can check my logic
I could ask this on stackexchange or just straight up find the answer online, but what fun would that be. Plus this is an opportunity to get to know everybody in the community.
So i've decided to try the projecteuler problems again (this time in java, not python) and am having trouble. Hopefully someone can check my logic
Code:
public static int p003(){
int x = 1;
while (remainderChecker(x) == false){
x++;
}
return x;
}
public static boolean remainderChecker(int x){
for (int i = 1; i<=20; i++){
if(x%i > 0){
return false;
}else
i++;
}
return true;
}
}