1 2 3 4 5 6 7 8 9
int GetLastDigit(unsigned int number) { int lastDigit = 0; unsigned int portion = number; while (portion > 0) { portion /= 10; lastDigit = number % 10; } return lastDigit; }
댓글 없음:
댓글 쓰기