c++ - get number of the binary % operator iterations -
i trying find out how many times % has substracted number another.
for example if 256 % 50 = 6, iterations have been 5? 256 - 50 - 50 - 50 - 50 - 50.
if 145 % 40 = 25, iterations have been 3. 145 - 40 - 40 - 40.
i looking solution problem without usiong kind of loop, recursion or goto.
what you're looking /
operator.
try division operator instead of modulus operator. works every time. it's fundamental math.
Comments
Post a Comment