Suppose the required number to convert is an integer. Then you can use modular math - you can convert a number to a module with a base of 100,000. This means that only the last 5 digits will be saved. The conversion can be performed by the operator for the remainder of the division, the %
operator.
The code:
int x = 123456; int lastDigits = x % 100000;
Gaim
source share