On Wed, 11 Dec 2002, Stephen wrote:

> I have a question. How would you move the decimal left or right,
> depending on if the number a user enters is negative or not, and then
> move it that many spaces? If needed, it would add zeros.

Math ... multiply & divide ... I assume you're using a base-10 number
system, so multiply or divide by 10 when your user's input indicates you
should do so.

> One other question. How would I find the first 0 of a repeating zero.
> Like 204,000. How would you find the 0 in the 4th column.

I have one for you first.  Are you using this list to do your homework?
I've noticed that over the past couple days you've been asking
not-necessarily PHP questions, but /basic/ programming questions.

For your repeating zeors question, you'll have to make use of some string
functions or a regexp function.  Look for a pattern of more than 1 zero.

        g.luck,
        ~Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to