@rajess
It works for all the cases.

On Sat, Sep 25, 2010 at 8:42 PM, rajess <rajess1...@yahoo.com> wrote:

> this wont work if x=24 i.e.multiple of 8
>
> On Sep 25, 6:00 pm, Baljeet Kumar <baljeetk...@gmail.com> wrote:
> > solution = ((x>>3) + 1)<<3;
> >
> > On Sat, Sep 25, 2010 at 5:45 PM, Rahul Singal <rahulsinga...@gmail.com
> >wrote:
> >
> > > let the number be x .
> >
> > > solution = x - (x%8) + 8;
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Algorithm Geeks" group.
> > > To post to this group, send email to algoge...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> <algogeeks%2bunsubscr...@googlegroups .com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/algogeeks?hl=en.
> >
> > --
> > Baljeet Kumar
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Baljeet Kumar

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@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?hl=en.

Reply via email to