    //+++++++++++++++++++++++++++++++++++++++++++++//
   //      Praktikumsaufgaben 13. 16.01.2001      //
  //         Fibonacci_rekursiv_Aufgabe_1        //
 //                     mastr0    					//
//+++++++++++++++++++++++++++++++++++++++++++++//

#include <iostream.h>
#include <stdio.h>
#include <conio.h>

int anz=0;

int fib(int i)
{
anz++;
if (i>2) return fib(i-1)+fib(i-2);
	else return 1;
}

void main()
{
int a,b,dx;
float i;
clrscr();
cout<<" Fibonacci-Zahlen im Interval [a,b]\n";
cout<<"\t mit der Schrittweite dx\n";
cout<<"-------------------------------------------------------\n\n";
cout<<"Bitte Startwert eingeben! a=";
cin>>a;
cout<<"Bitte Endwert eingeben! b=";
cin>>b;
cout<<"Bitte Schrittweite eingeben! dx=";
cin>>dx;
cout<<"\n";
anz = 0;
for(i=a;i<=b;i=i+dx)
	{
   cout<<"fib("<<i<<")="<<fib(i)<<"\tAnzahl der Aufrufe: "<<anz<<"\n";
   anz = anz +1;
	}
getchar();
}

