Download code

From LiteratePrograms

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 
 7 for (i=0; i<30; ++i) {
 8 	fib(i);
 9 }
10 
11 


Views
Personal tools