boss will ur code work for 330 in binary 10101010?? On Fri, Aug 14, 2009 at 3:09 PM, Arun N <[email protected]> wrote:
> take an number find its binary > add all odd bits and even bits seperately > now check if the difference is divisible by 3 > if yes it is > say 6 110 -----> 1+0 - 1 =0 > 9 1001 -----> 1+0 - 0+1 = 0 > 12 1100 ------> 1+0 - 1+0 = 0 > Arun, > > On Fri, Aug 14, 2009 at 1:15 PM, richa gupta <[email protected]>wrote: > >> >> can we check the divisibility of a given number by 3 withoutusing >> operators like '/' or '%'. >> I want the efficient solution to this problem .. >> >> can someone help ?? >> -- >> Richa Gupta >> (IT-BHU,India) >> >> >> > > > -- > Potential is not what U have, its what U think U have!!! > It is better to worn out than rust. > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---
