Answers for "find differene of palindrome numbers in c"

C
3

check is number is palindrome in C

#include <stdio.h>
#include <conio.h>

void main()
{

    int n,i,r=0;
    
    printf("Enter a number: ");
    scanf("%d",&n);
    
    for(i=n;i!=0;i)
    {
        r=r*10;
        r=r+ i%10;
        i=i/10;
    }
    
    if(r==n)
        printf("palindrome");
    else
        printf("Not palindrome");
}
Posted by: Guest on June-24-2021

Code answers related to "C"

Browse Popular Code Answers by Language