Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool isPalindromes(int a, int i){
- int nArray[(int)1e5+1], j = 0;
- while (a>0) {nArray[j++] = a%i; a/=i;}
- for (int k = 0; k<=j/2;++k)
- if (nArray[k] != nArray[j-k - 1]) return false;
- return true;
- }
Add Comment
Please, Sign In to add comment