diff options
Diffstat (limited to 'contrib/bc/Test/fact.b')
-rw-r--r-- | contrib/bc/Test/fact.b | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/bc/Test/fact.b b/contrib/bc/Test/fact.b new file mode 100644 index 0000000..8d14747 --- /dev/null +++ b/contrib/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 + |