LightOj-1225 Pallindrome Numbers

#include <stdio.h>
int main()
{
    int t,i,sum,temp,n,j,r;
    scanf("%d",&t);
    for(i=1;i<=t;i++)
    {
        scanf("%d",&n);
        temp=n;
        sum=0;
        while(temp!=0)
        {
            r=temp%10;
            sum=sum*10+r;
            temp=temp/10;
        }
        if(n==sum)
        {
            printf("Case %d: Yes\n",i);
        }
        else
        {
             printf("Case %d: No\n",i);
        }
    }
    return 0;
}

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

2 comments:

  1. There are numerous reasons why it's imperative to check Social Security number data on your representatives, for example, to ensure that you are recruiting legitimate laborers, guaranteeing precise compensation reports, and guaranteeing that your workers' wages are appropriately credited to their SSA income records. A basic grammatical mistake could have sad long haul impacts on a representative. For instance, consider the possibility that a worker's SSN was entered erroneously. Imagine a scenario in which nobody saw this for quite a long time. A basic confirmation could stay away from this possibly terrible bungle.Numbers

    ReplyDelete
  2. Either the drive can be conveyed to our office situated in Bangalore or it very well may be gotten and dropped to customer's and client's area (Currently accessible assistance in Lab recuperation in Bangalore area) or individual visit to our office area, other city or nation is upheld by means of dispatch office.recovery hdd

    ReplyDelete