Ahh I see, agreed.Carey Brown wrote:... If they say two int's then leading zero's don't exist. If they say two Strings representing a number then it may or may not allow leading zeros...
Sorry, StringBuilder would be good than String since String is immutable.Ganesh Patekar wrote:... you better use String....
I guess you mean to say, how to compare two numbers to find out same digits present in those two numbers. For example num1 = 1028 and num2 = 2205 Output: 0 2wayne brandon wrote:how could i compare if there is the same number in each, like the 2?
I guess you meant i-- rather than i++ at for update.Brecht Geeraerts wrote:....