yeah if it was a divisibility test then the question would have been too trivial .. the last digit after doing itoa will be the remainder .
On Sat, Jul 30, 2011 at 11:52 AM, nivedita arora < vivaciousnived...@gmail.com> wrote: > i think solution of ankit is right ! > sorry even i forgot tht que ws not divisibility test ..but to get > quotient :-| > > On Jul 30, 10:03 pm, Ankur Khurana <ankur.kkhur...@gmail.com> wrote: > > @roopam : i got the question all wrong. . . > > > > On Sat, Jul 30, 2011 at 10:01 PM, Roopam Poddar <mailroo...@gmail.com > >wrote: > > > > > > > > > > > > > > > > > > > > > The objective is to divide the number by 3 and not just check for it's > > > divisibility. > > > Adding the digits using itoa() and then repeated subtraction will check > for > > > it's divisibility by 3 and not give us the quotient. > > > To get that you will have to carry out repeated subtraction on the > number > > > anyway. > > > So whats the point? > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Algorithm Geeks" group. > > > To view this discussion on the web visit > > >https://groups.google.com/d/msg/algogeeks/-/BWTzYtcBhIgJ. > > > > > 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?hl=en. > > > > -- > > Ankur Khurana > > Computer Science > > Netaji Subhas Institute Of Technology > > Delhi. > > -- > 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?hl=en. > > -- The more you sweat in the field, the less you bleed in war." Ankit Minglani NITK Surathkal -- 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?hl=en.