November 25th, 2013, 04:24 AM
Reducing numbers to one digit (numerology related)
Can you come up with an algorithm for me?
If you don't know what numerology is, or how it works just forget it and see if you can solve this problem.
I want to reduce a multiple digit number to one digit by adding each digit together, then again, and again etc...until there is only one digit.
Examples of reduction method:
9999 (9+9+9+9=37 then 3+7=10 then 1+0=1)
8765 (8+7+6+5=26 then 2+6=8)
4444 (4+4+4+4=32 then 3+2=5)
Also, I need to convert letters into numbers in a way that the numbers 1-9 correspond with A-I, J-R, and S-Z (z ending on 8 of course). And I'm hoping there's a short way to program in VB other than A=1 B=2 so on....
Any help is appreciated thanks!
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.