Interesting idea, but what's the point? After all, a variant of this is to use the integer as a bitset, but without any special requirements to the contrary, I think that this whole "cannot use array" business is misguided.Originally Posted by oogabooga
I can understand requiring that the input number not be stored in an array as that teaches the learner how to break an integer into individual digits (as indicated by the operations listed), but beyond that it sounds like fluff to me, unless the teacher really intended for the whole process to be repeated for each digit (as grumpy seems to think is fine, and given that there are only ten digits, I suppose I can concede that it is).