On Fri, 29 Jun 2007 14:52:01 -0700, Vinki

<Vi***@discussions.microsoft.comwrote:

I am trying to convert the digits to even number so for example if I

have

3 digit number, I want it to be 4 digit and If I have 5 digit number, I

want

it to be 6 digit.

What if you already have a four-digit number? Should numbers with an even

count of digits be left alone?

Are you sure this isn't a homework assignment? Sure doesn't sound like

anything you'd find in non-academic code.

Anyway, the first step is to understand that until you've converted a

number to a string, based on some particular number base (base 10,

apparently in your case) there is no such idea as "number of digits".

Once you figure that out, then it's a simple matter to count the digits

and prepend the character '0' when needed.

Pete