You need to sign in to do that
Don't have an account?
shoesman
ERROR: Loop control must be contained by a Loop
hi,
Ive got this erroe but I have no idea why I got this,
the apex class is
----------------------
Integer R = math.mod(ran1,ran2);
Integer d = (ran1/ran2);
public Integer getDivideNumber() {
if (R!=0) {
continue;
}else{
return d;
break;
}
}
----------------------
Whant I am trying is that I dont want to have remainder, I would like to have only the answer by dividing.
But it seems its looping, do some have any idea to solve this issue ????
PS:
I am seriously need to solve this !!
Please someone help me !!
The commands you have - 'continue;' and 'break;' - are only used when in a loop. Not exactly sure what you're trying to achieve. Do you just want to return the value d if there is no remainder? If so try just returning null if R is not equal to zero.