Problem is to find the last digit of the number (1358)^n. I\'ve used the same method in c++ with two different compilers but the results are different in both the compilers