it is question about on coding language.
Attachments:
Answers
Answered by
0
Answer:
import java.util.*;
public class palins
{
public static void main(String args[])
{
Scanner ss=new Scanner(System.in);
int m=ss.nextInt();
int n=ss.nextInt();
int z=m+(n*10),c=0;
for(int x=m;x<=z;x++)
{
int a=x,r=0;
while(a>0)
{
int d=a%10;
r=r*10+d;
a=a/10;
}
if(r==x)
{
c++;
if(c==n)
System.out.println(x);
}
}
}
}
Explanation:
Similar questions