Code:
for ($j = "100"; $j <= "999"; $j += 1){
for($i = "100"; $i <= $j; $i += 1){
if(isPalindrome($i*$j) and $i*$j > $l*$p){
$l=$i;
$p=$j;
}
}
}
print STDOUT ($l*$p)." Is a product of two three-digit integers and a palindrome.\n";
print STDOUT "($l,$p)";
sub isPalindrome
Leave a comment: