aboutsummaryrefslogtreecommitdiff
path: root/p20e
diff options
context:
space:
mode:
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).