Ad
  • Default User Avatar

    I see now... I was so focused on extracting the most significant digit, I didn't even consider I could make life easy by starting with the least significant digit.

    I should have used num % 10 to find the least significant digit, then num/=10 would slot the next digit for extraction. :)