This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
This may not be the most efficient psuedo-code, but here's an approach
[code] change int to String add "000" in front of string get a substring of string.length-4 - string.length [code]
In the two minutes of thinking about it, this is the simplest approach I could come up with. There are several other ways - looping, and conditionals come to mind, but I think we'd all like to avoid control structures when possible.