Renewed Structure
This commit is contained in:
15
Algorithm/Recursion/P28_20_Feb.cpp
Normal file
15
Algorithm/Recursion/P28_20_Feb.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int feb(int n){
|
||||
if(n > 1)
|
||||
return feb(n - 1) + feb(n - 2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main(){
|
||||
for(int i = 1;i < 10; i++){
|
||||
cout << feb(i) << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user