how can i get last number of 2003^2003
2003^1 = ends in 3
2003^2 = ends in 9
2003^3 = ends in 7
2003^4 = ends in 1 and the pattern of the ending digit repeats every 4th power
So 2003 mod 4 = 3 .........and the 3rd result in the above pattern is what we are after
So....the ending digit is 7