last digit of 1378 ^ 4 code example Example: find last digit of number //C++ int last_digit = number % 10;