Download code

Jump to: navigation, search

Back to Fibonacci_numbers_(bc)

Download for Windows: single file, zip

Download for UNIX: single file, zip, tar.gz, tar.bz2

fib.bc

1 define fib (n) {
2 	if(n<2) return n;
3 	return (fib(n-1)+fib(n-2));
4 }
5 
6 for (i=0; i<30; ++i) {
7 	fib(i);
8 }
9