Using MIPS assembly if I prompt a user to input an integer how can I then take that integer and break it up into it's requisite parts?
Example:
# User inputs a number
li $v0, 5 # read value of n
syscall
I then store the value in $v0 in a temporary register, say $t0, and need to break it up into each part that makes it up. So, 308 has to be broken up into: 3, 0, and 8. I need to do this so that I can then square each of these parts and add them together.
The input value from the user has to be input as an integer.
thanks, nmr