Created
July 17, 2017 17:42
-
-
Save ThePratikSah/d2352eaddd28292d28e840f4ac9410db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main() { | |
int num, temp, digit, rev_num=0; | |
printf("Enter any number:\n"); | |
scanf("%d", &num); | |
temp=num; | |
while(num!=0){ | |
digit=num % 10; | |
rev_num=(rev_num*10)+digit; | |
num=num/10; | |
} | |
if (rev_num==temp) | |
printf("Palindrome"); | |
else | |
printf("Not palindrome."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment