All pastes #245950 Raw Edit

Anonymous

public text v1 · immutable
#245950 ·published 2006-11-11 17:28 UTC
rendered paste body
#include<stdio.h>
int main(void)
{
  long a,k=0,b=0,c,t,e[100];
  int i,j=0,n;
  scanf("%d",&n);
  while(n--)
  {
    scanf("%ld",&a);              
    k=a+1;
    for(;k!=b;k++)
    {
     t=0;            
     c=k;
     while(c!=0)
     {
     t=(t*10)+(c%10);
	 c=c/10;
     }            
     if(t==k)
     break;
    } 
    e[j]=t;
    j++;
}
for(i=0;i<n;i++)
  printf("%ld\n",e[i]); 

 return(0);
}