summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/bc/Test/fact.b
blob: 8d1474702bdc04a97b1ab778bf708af54d32359c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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