As the title sais, i want to find the last digit of an 2^n number.
I know that it's about repetition of even numbers, but i don't know how to make it happen.
This is what I did:
return (2*ascii%10)%10 - 2;
But it's not the correct method
For example:
I got 2^97, find the last digit of this very large number. Thank you!