first and last digit of a number not getting passed in an api code example Example: find last digit of number //C++ int last_digit = number % 10;