Calculating Individual Numbers
I'm new to the forums (as you can probably tell), and relatively new to java. I've fiddling with Java for awhile and have gotten a bit in (to 2D arrays), but there is one thing I still cannot figure out how to do.
I have no clue to explain it other than, I'm trying to get output a sum of two numbers. And when i say two numbers, i mean, if you enter say, "16" it will display "7" because 6+1.
A friend of mine says I have to convert the string to an Int (which i did), but he also says I have to declare each number as a variable. That is where I'm stuck at as I'm not too familiar with separating each number and converting them into their own variable.
If anyone can help me, it would be most appreciated. I know it's relatively easy as I had to do something similar a long time ago, but I just can't remember what exactly to do.
Thank you very much.