← Back to topics
Topic

while(!(j%2))

m
marcelo
whats does this do


while(!(j%2))
j/=2;

?
thanks
A
Al3kSaNdaR
It does j = j / 2 while j % 2 != 0 .
t
tgudlek
After this while-loop, J while be greatest odd divisor of itself before the while-loop.