public class Test_Tng{
public static void main(String args[]){
InputStream is = System.in;
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
try{
String n = br.readLine();
long l = Long.valueOf(n).longValue();
long k=l, p=0;
while(k!=0){
p=p*10 + k%10;
k=k/10;
}
if(l==p) System.out.print(l + " la so thuan nghich ");
else System.out.print(l + "khong la so thuan nghich");
}
catch(IOException ie){
System.out.println("Error: " +ie);
}
}
}
Klik untuk melihat kode: :) =( :s :D :-D ^:D ^o^ 7:( :Q :p T_T @@, :-a :W *fck* x@