Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: splitting a number into several numbers

by dwatson06 (Friar)
on Jul 05, 2002 at 18:11 UTC ( #179698=note: print w/ replies, xml ) Need Help??

in reply to splitting a number into several numbers

If this is input by the user and you will not know how many numbers will be coming in...
You can grab the length of the input...
half it...
do a loop using the value...
then just grab substrings by an increment of twos.
Of course you will need to make sure the number coming in is even then handle other conditions on the odds.
Hope this helps.

Comment on Re: splitting a number into several numbers

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://179698]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2015-11-26 17:21 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (704 votes), past polls