aboutsummaryrefslogtreecommitdiff
path: root/p20e
diff options
context:
space:
mode:
authorNathan Lasseter <nathan.je.lasseter@googlemail.com>2009-10-04 00:56:56 +0100
committerNathan Lasseter <nathan.je.lasseter@googlemail.com>2009-10-04 00:56:56 +0100
commit0248ed34ce3d05228bc5084669c3a27933be0c2e (patch)
treeb9c4990344b0863a2af851b5917c49f3a5f03e6b /p20e
parent00686037d57eb0a0d5eba6eeb6fcc9692e8b59f6 (diff)
first commit
Diffstat (limited to 'p20e')
-rwxr-xr-xp20e4
1 files changed, 4 insertions, 0 deletions
diff --git a/p20e b/p20e
new file mode 100755
index 0000000..34f984d
--- /dev/null
+++ b/p20e
@@ -0,0 +1,4 @@
+#! /usr/bin/env escript
+
+main(_) -> io:format("~w~n",[lists:sum([X-48 || X <- integer_to_list(fact(100))])]).
+fact(1) -> 1; fact(X) -> X * fact(X-1).