Filename: prob20.hs
--n! means n * (n * 1) ... 3 * 2 * 1
--
--Find the sum of the digits in the number 100!
module Prob20
where
import Char
answer = sum(map digitToInt (show(product [1..100])))
syntax highlighted by Code2HTML, v. 0.9.1
No comments:
Post a Comment