if a got a int variable whit the numbers 1357 in it how can i make it to split so i get 1 in int x. 3 in int y.5 in int z.......
if a got a int variable whit the numbers 1357 in it how can i make it to split so i get 1 in int x. 3 in int y.5 in int z.......
Imagine the integer 123. Now imagine the integer 100.
Assuming the result is an integer value, what's the result of 123/100?
How about 123%10?
thx one more question is there a way to calculate how many numbers there are in the int??
Take 123 as example again. If you do 123/1000, what's the result?
Now, isn't that the same as 123/10/10/10?
How many digits does 123 have?
How many divisions by 10 have you made?
thx :P i feel little stupid that i couldn't figure that our for my self xD