This is solved and very well explained at http://geeksforgeeks.org/?p=511

On Aug 17, 7:19 am, Abhijeet Kumar <[email protected]> wrote:
> i think the code given above doesn't work ..
> so may be dat needs to be checked ....
> any better ideas??
>
>
>
> On Mon, Aug 17, 2009 at 7:20 PM, manish bhatia <[email protected]> wrote:
> > Keep adding the digits till you are reduced to single digit. Then check if
> > it is 3, 6 or 9
>
> >  ------------------------------
> > *From:* richa gupta <[email protected]>
> > *To:* programming-puzzles <[email protected]>;
> > algogeeks <[email protected]>
> > *Sent:* Friday, 14 August, 2009 1:15:13 PM
> > *Subject:* [algogeeks] Check divisibility by 3
>
> > 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)
>
> > ------------------------------
> > Yahoo! recommends that you upgrade to the new and safer Internet Explorer
> > 8<http://in.rd.yahoo.com/tagline_ie8_1/*http://downloads.yahoo.com/in/i...>
> > .
>
> --
> Abhijeet

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to