This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.

Now my intention is make the programme run like below..

I have an integer number lets say 4567.
The programme output will print 410614(every second digit will be added with it self)
example->
int num=4567.
second digit is four(4) here,so in output it will add 5+5=10
then fourth digit is seven(7) here,so in output it will be 7+7=14.
Finally it will give me the whole output as 410614.

I have an integer number lets say 4567.
The programme output will print 410614(every second digit will be added with it self)
example->
int num=4567.
second digit is five(5) here,so in output it will add 5+5=10
then fourth digit is seven(7) here,so in output it will be 7+7=14.
Finally it will give me the whole output as 410614.

expansion of Campbell suggestion:
while(true)
int remainder = num % 10
print *remainder*
num = num / 10; // get remaning digits
if num == 0 then break;