Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  1548
Language: C/C++
Code:
#include <iostream>

using namespace std;

int Fib(int i)

{

int value = 0;

if(i < 1) return 0;

if(i == 1) return 1;

return Fib(i-1) + Fib(i - 2);

}

int main()

{

int i = 0;

while(i < 7)

{

cout << Fib(i) << endl;

i++;

}

return 0;

}
          
Comments: