@rajess It works for all the cases. On Sat, Sep 25, 2010 at 8:42 PM, rajess <[email protected]> wrote:
> this wont work if x=24 i.e.multiple of 8 > > On Sep 25, 6:00 pm, Baljeet Kumar <[email protected]> wrote: > > solution = ((x>>3) + 1)<<3; > > > > On Sat, Sep 25, 2010 at 5:45 PM, Rahul Singal <[email protected] > >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 [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<algogeeks%[email protected]> > <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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[email protected]> > . > 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 [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?hl=en.
