08.08.2016, 23:48
Hello,
I'm designing a system and have got myself stuck.
Basically, what I'm trying to figure out is this:
If I have a 15-digit string of numbers for example:
How do I multiply every other number by 2? To add to this, how would I then check the result, and if the result per number is a 2-digit number, add the digits together to make it a single digit number?
I've tried using loops, and other methods but all without any luck.
My mathematics skills aren't very good.
I hope this makes sense.
Thank you,
Isolated.
I'm designing a system and have got myself stuck.
Basically, what I'm trying to figure out is this:
If I have a 15-digit string of numbers for example:
Код:
149655893228335
I've tried using loops, and other methods but all without any luck.
My mathematics skills aren't very good.
I hope this makes sense.
Thank you,
Isolated.