the problem is:
I want to know if there is any way to find repeated digits in a number sequence. for example : 12341 there are two "1's" and in 11 we can find two "1's" also. Is there some mathematical reason between them valid for any number sequence?

I cant use array's or vector's of any kind and I also can't use String. I think this is only a maths problem. Can any one help me?!