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