I'm working to make a program which will subtract a pair of numbers until it reaches kaprekars constant.
in cases where the number is <1000, we are supposed to take the number and add a leading zero to it.
i.e 999 would become 0999.
I have a feeling this has something to do with the format specifiers, but I'm under the assumption that the leading zeros are not actually part of the number.
Am I totally barking up the wrong tree or am I close to what I need?
Here is my code for referenceCode:remainders = userInput % 1000;inputVariables = userInput / 1000; userInput = remainders; remainders = userInput % 100; inputVariables = userInput / 100; userInput = remainders; remainders =userInput % 10; inputVariables = userInput / 10; userInput = remainders; inputVariables = remainders; numberY = (inputVariables*(1))+(inputVariables*(10))+(inputVariables*(100))+(inputVariables*(1000)); return numberY;