Original Post
Well I didn't know how to describe the problem in the topic title so here we go!
The program takes number for input ( lets say "123" ), I'll need to program to add that number together into a new number like: 1+2+3 = 6.
I thought the easiest way to do this was to convert the INT into a string then use substring and then convert them back into int's and add them together.
But I'm sure there is an easier way to do this so please tell me
BTW. I don't know if this is the right section but the "Beginner" section is for game-programming as i understand it
The program takes number for input ( lets say "123" ), I'll need to program to add that number together into a new number like: 1+2+3 = 6.
I thought the easiest way to do this was to convert the INT into a string then use substring and then convert them back into int's and add them together.
But I'm sure there is an easier way to do this so please tell me
BTW. I don't know if this is the right section but the "Beginner" section is for game-programming as i understand it