#include <stdio.h> int main() { int n , r , sum = 0 , temp ; printf("Enter an integer : "); scanf("%d" , &n); temp = n ; while (n > 0) { r = n % 10 ; sum = (sum * 10) + r ; n = n/10 ; } printf("The reverse of a given number : %d\n" , sum ); if (temp == sum ) { printf("%d is a palindrome\n" , temp ); } else { printf("%d is not a palindrome\n" , temp ); } return 0 ; }
Subscribe for more such posts..
Dear Reader...
I hope u are like my posts. If so then please don't forget to like , share and follow my blog for more such posts ,also feel free to write suggestions in the comment box given over here.
Thank you...
I hope u are like my posts. If so then please don't forget to like , share and follow my blog for more such posts ,also feel free to write suggestions in the comment box given over here.
Thank you...
Search This Blog
C program to check whether a given number is Palindrome or not.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment