Divisibility without using modulus
The aim of the program is to find whether a number is divisible without using the modulus operator
What do I mean by this? If I say 27 is divisible by 3, a routine has to be followed which does not include modulus operator to check whether 27 is divisible by 3 and follows some other procedure for checking divisibility! Can anyone provide me a solution? |
This smells of homework....
There is something common between all numbers that aren't evenly divisible... just think about what that is... I'll give you a hint, you can implement this in one line using mod's sister function.... |
All times are GMT -5. The time now is 04:25 PM. |