# Condensing Numbers

by (no login)

I have made a simple program which is called [The Number 9 Game in which a person chooses any number and after a few calculations, end up being 9.

EXAMPLE:
1. I pick 63
2. I multiply that number by 3 which equals 189.
3. That number is then added to 3 which equals 192.
4. Then you multiply that number by 3 again which equals 576.
5. Those individual numbers are then combined & displayed ( 5 + 7 + 6 = 18 ).
6. Then that number 18 is combined ( 1 + 8 ) & displayed which is only one digit... a 9.

Can anybody help me resolve this problem???
I really need a code that can add individual numbers/digits to each other, as seen in #5 & 6 above.

I would really appreciate it.
Also, I would give credit for the one who does this in the Flower Box.
Thanks.

Here's the code.

CLS
PRINT
PRINT
PRINT
PRINT "This is a number game which always wind up to be a 9."
PRINT
PRINT
PRINT
PRINT
INPUT " Enter your # "; N
PRINT
PRINT
Na = N * 3
Nb = Na + 3
Nc = Nb * 3
PRINT
PRINT
PRINT " Your Number was "; N
PRINT
PRINT ""; N; "x 3 ="; Na
PRINT
PRINT Na; "+ 3 ="; Nb
PRINT
PRINT Nb; "x 3 ="; Nc
PRINT
PRINT
PRINT " Your Number totaled to:"; Nc
PRINT
PRINT
PRINT " To get your single-digit #, add each individual number together"
PRINT " until only 1 number is left."
PRINT
PRINT
PRINT " EXAMPLE: 594"
PRINT " 5 + 9 + 4 = 18"
PRINT " 1 + 8 = 9"
PRINT
PRINT
PRINT " Therefore, the answer would be 594 = 9"
PRINT
END

Posted on Mar 27, 2011, 12:17 PM

 Response Title Author and Date Concatenate string digits Solitaire on Mar 27 Concatenate does do the job Kevin C on Apr 4 Re: Condensing Numbers qbguy on Apr 1 Very clever, qbguy, but there are some problems. Solitaire on Apr 3 Number 9 Game Modification Error Kevin C on Apr 4 It's a problem with the Network54 Forum display!!!! Solitaire on Apr 4 Are you unchecking the "enable formatted text" checkbox? Michael Calkins on Apr 4 * I believe I did. Solitaire on Apr 4 I've been stung by that too. Pete on Apr 5 Posting > and < when formatting is enabled ChronoKitsune on Apr 4 * if x < ln then Michael Calkins on Apr 6 addnumerals& Michael Calkins on Apr 4 integer division instead of using a string Michael Calkins on Apr 6