# include <iostream.h> # include <conio.h> long Table[25]={0}; const long fibonacci(const int); int main() { clrscr( ); int number; cout<<\"\\n Enter the number ( 1 - 25 ) = \"; cin>>number; number=((number>25)?25:number); cout<<\"\\n\\n The \"<<number<<\"_th term of fibonacci series = \"<<fibonacci(number); getch( ); return 0; } //---------------------------- fibonacci( ) ---------------------------// const long fibonacci(const int n) { if(Table[n]==0) { if(n<=1) Table[n]=n; else Table[n]=(fibonacci(n-1)+fibonacci(n-2)); } return Table[n]; }