summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/bc/Test/fact.b
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1993-04-10 15:51:24 +0000
committercgd <cgd@NetBSD.org>1993-04-10 15:51:24 +0000
commit439d2fb46cfec58a16c4a9856cc00ea4a2ee6de3 (patch)
treedd34836a974bf8d23a53a2773f34394576710d12 /gnu/usr.bin/bc/Test/fact.b
parenta3960efdef82d52889d981e42c8e404f99470203 (diff)
gnu bc. necessary to compile the distribution
Diffstat (limited to 'gnu/usr.bin/bc/Test/fact.b')
-rw-r--r--gnu/usr.bin/bc/Test/fact.b13
1 files changed, 13 insertions, 0 deletions
diff --git a/gnu/usr.bin/bc/Test/fact.b b/gnu/usr.bin/bc/Test/fact.b
new file mode 100644
index 00000000000..8d1474702bd
--- /dev/null
+++ b/gnu/usr.bin/bc/Test/fact.b
@@ -0,0 +1,13 @@
+define f (x) {
+
+ if (x<=1) return(1)
+ return (f(x-1)*x)
+}
+
+"Here we go"
+for (a=1; a<100; a++) b+=f(a)/a
+"
+"
+"b=";b
+quit
+