C Program to Check Whether a Number is Palindrome or Not
A palindrome number is one that remains the same on reversal. Example- 121, 434
- //C program to check palindrome
- #include <stdio.h>
- int main() {
- int no, no1, rev = 0, remr;
-
- printf("Enter any number: ");
- scanf("%d", &no);
- no1 = no;
-
- while (no > 0){
- remr = no % 10;
- rev = rev * 10 + remr;
- no = no/ 10;
- }
-
- if (no1 == rev){
- printf("Given number is a palindromic number");
- }
- else{
- printf("Given number is not a palindromic number");
- }
- return 0;
- }
Output

Solution not working or have any suggestions? Please send an email to [email protected]
Download Android App