forked from sainirock61/CPP-Projects-Algos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFIBONACCI2.cpp
More file actions
62 lines (44 loc) · 1.39 KB
/
FIBONACCI2.cpp
File metadata and controls
62 lines (44 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include<iostream>
using namespace std;
void fibonacci(int n)
{
static int n1=0,n2=1,n3;
if(n>0)
{
n3 = n1+ n2;
n1 = n2;
n2 = n3;
cout<<n3<<" ";
fibonacci(n-1);
} var $marker_url = ( is_internetExplorer11 ) ? 'assets/img/location.png' : 'assets/img/location.png';
//define the basic color of your map, plus a value for saturation and brightness
var $main_color = '#2d313f',
$saturation= -20,
$brightness= 5;
//we define here the style of the map
var style= [
{ var $marker_url = ( is_internetExplorer11 ) ? 'assets/img/location.png' : 'assets/img/location.png';
//define the basic color of your map, plus a value for saturation and brightness
var $main_color = '#2d313f',
$saturation= -20,
$brightness= 5;
//we define here the style of the map
var style= [
{
}
int main()
{
cout<<"\n====================================================================\n";
int n;
cout<<"ENTER THE NUMBER OF TERMS OF THE FIBONACCI SERIES :-- ";
while(!(cin>>n)|| (n<=0))
{
cin.clear();
cin.ignore(100,'\n');
cout<<" !!!!! INVALID INPUT. ENTER AGAIN :-- ";
}
cout<<"\n 0 1 ";
fibonacci(n-2);
cout<<"\n====================================================================\n";
return 0;
}