Tuesday, July 14, 2009

In c programming using fibonacci sequence, if n=2 and sequence=5, can you display "2 2 4 6 10" using C code?

C programming only pls.

In c programming using fibonacci sequence, if n=2 and sequence=5, can you display "2 2 4 6 10" using C code?
google it, something like:





fib(n){if(n==1||n==o)return 1;else fib(n-1)+fib(n-2);}





Hope that helps


No comments:

Post a Comment