+ 1
How to split number which has many digits with pow() functin?
Example: 45678 into 4 5 6 7 8
2 Respostas
+ 7
Ipang , any code sample how this works? Thanks!
+ 2
The pow() function can be used to generate a power of 10 divisor which yields a value less then 10 when used to divide the number.
You can then proceed extracting each digit from the number sequentially, MODing the number by the multiplier, followed by dividing the divisor by ten, in a loop.