Please I Help Me for My Code
How to solve the following problem in a java programming? Please help and Thank you very much.
Suppose I have a number like this
420815722
I then grouped these into 1-digit numbers and 2 and so on,
so that it becomes
4 20 8 15 7 22
then every two digits are added together, so it becomes:
4 (2 +0) 8 (1 +5) 7 (2 +2)
the results
4 2 8 6 7 4
Re: Please I Help Me for My Code
Well first I'll suggest getting whatever number you're working with into a String; that way you can easily manipulate the characters. After that, you will probably need to make use of the <String>.substring() method and possible some sort of loop.
Have you started with any code at all? If you have, please post it here.