Is there a way to check if the last digit of a 4-digit (or any digit) number is a 1?
I am trying to make something that checks if the first and last digit of a number are both 1. Suppose our number is 1581. To check if the first digit is 1 is trivial. I can go..
if number - 2000 < 0 AND number - 999 > 0, then the first digit is always one.
Is there a test similar to above to check if the last digit is 1?
EDIT: Just to add more context to the question, we want to find an automated way to check if the number starts and ends with a 1.