Consider a two digit number with unit digit as a and tens digit as b
So a and b both are positive interger less than 10
So number can be written as 10b + a
Now and both have 0 at unit place. So unit digit of will be decided by
And for a being single digit integer, you only get 0,1,4,5,6,9.at units place of
You can extend this proof for three digit number 100c + 10b + a.
Same logic will be applied in this case