Cud u plz explain the logic behind this?
On Mon, Sep 7, 2009 at 9:44 PM, Gokul <[email protected]> wrote:
>
> you can try this......
> int add(int x, int y)
> {
> if (!x) return y;
> else
> return add((x & y) << 1, x ^ y);
> }
>
>
>
> On Sep 7, 4:01 pm, ritter <[email protected]> wrote:
> > how to add two integers without using arithmetic operators?
> > can anyone help me.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---