I'm wondering if there is a way to remove the 1st digit from a number without going through the number to string routinue. For example if I were to input 3256, the program would return 3. Is this possible or not? Thanks in advance!
Yes. Make a loop where you take the modulo 10 of the number (gets the least significant digit) and then divide the number by 10. Keep looping until the result of the division is zero and the modulo value from the previous loop iteration will be your digit.
Use this line of code:
Doesn't work for negatives, though. :P
BTW, most of that code came from Weregoose.
Negatives and zero supported: int(X.1^int(log(abs(X+not(X
Nice, but shouldn't the 1st int be replaced by iPart? With int, -44 gives -5; iPart gives -4.