Find the largest palindrome made from the product of two 3-digit numbers.

- Code: Select all
`// Here, brute force is used`

// pe004 ( -- n ) : Returns largest palindrome

: pe004

| i j |

0 999 100 -1 step: i [

i 100 -1 step: j [

i j * dup asString dup reverse == ifTrue: [ max ] else: [ drop ]

]

] ;