Answers for "string is palindrome or not c programe"

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 "string is palindrome or not c programe"

Code answers related to "C"

Browse Popular Code Answers by Language