how to print the last number of a digit java code example Example: find last digit of number //C++ int last_digit = number % 10;