In the c lens (Mac development). How can I find out if a number is divisible by another number, not decimal?
Assuming you are dealing with integers, use the module function:
if ((a % b) == 0) { // A is divisible by B } else { // A isn't divisible by B }
I am not an objective c programmer, but in general, just checking if A mod B = 0 ... should it work in OC?
greetings.