Files
LeetCode/Easy/palindrome-number/solution.c
Arkaprabha Chakraborty cef4c4dcc4 Initial commit
2022-07-26 16:15:18 +05:30

14 lines
234 B
C

bool isPalindrome(long int a) {
if (a < 0)
return false;
long int b = 0;
for (long int c = a; c != 0; c /= 10)
b = b * 10 + (c % 10);
if (a == b)
return true;
else
return false;
}