// simple_print_series_palindrom
import java.io.*;
class simple_print_series_palindrome
{
public static void main(String args[])
{
int start,end,i,no,rem,rev=0;
try
{
DataInputStream cin=new DataInputStream(System.in);
for(i=100;i<=150;i++)
{
no=i;
while(i!=0)
{
rem=i%10;
rev=rev*10+rem;
i=i/10;
}
if(rev==no)
{
System.out.println(no+" is palindrom ");
}
}
}
catch(Exception e)
{
System.out.println("wrong input");
}
}
}
No comments:
Post a Comment