Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2012 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4296706 to your computer and use it in GitHub Desktop.
Save anonymous/4296706 to your computer and use it in GitHub Desktop.
; A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99. ; Find the largest palindrome made from the product of two 3-digit numbers.
(def nums (for [x (range 100 1000) y (range 100 1000)]
(* x y)))
(defn palindromic? [n]
(let [n n rev-n (apply str (reverse (str n)))]
(= n (BigDecimal. rev-n))))
(last (sort (filter palindromic? nums)))
@arunkumardancer
Copy link

A number is palindrome, if number remains same after reversing it's digits. Here is the C program to check for palindrome number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment