Write a C program to find whether a number is pallindrome or not

#include<stdio.h>
main()
{


    int m, n, f;
    n = 0;
printf("enter any number",m);
    scanf("%d", &m);
    f = m;   
    while (m != 0){
        n =n*10+ m % 10;
        m = m / 10;
    }
    if (n==f){
        printf("palindrome\n");
    }else{
        printf("not palindrome\n");
    }
}

Post a Comment

0 Comments