C Program To Show Pallindromes Number At Given Range

#include <stdio.h>
int main()
{
    int r1,r2,i,r,sum,t;
    printf("Enter Ranges=\n");
    scanf("%d%d",&r1,&r2);
    printf("Among Range Palindrome Numbers Are\n");
    for(i=r1;i<=r2;i++)
    {
        t=i;
        sum=0;
        while(t!=0)
        {
           r=t%10;
           sum=sum*10+r;
           t=t/10;
        }
        if(sum==i)
        {
            printf("%d\n",sum);
        }
    }
}

Download Coding Interview Book and Get More Tutorials for Coding and Interview Solution: Click Here

Download System Design Interview Book and Get More Tutorials and Interview Solution: Click Here

Do you need more Guidance or Help? Then Book 1:1 Quick Call with Me: Click Here

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment