Cud u plz explain the logic behind this?

On Mon, Sep 7, 2009 at 9:44 PM, Gokul <spgo...@gmail.com> 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 <amar8...@gmail.com> 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 algogeeks@googlegroups.com
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to