1 # JavaScript 2 for (n=1; n<1000000; ++n) 3 { 4 s = new String( n ); 5 r = ""; 6 for (i=s.length - 1; i >= 0; --i ) 7 r += s[ i ]; 8 if (r[0] != '0' && r != s && s % r == 0) 9 document.write( s + "<br/>" ); 10 }