#include
#include
int n;
char lagi;
int fibonacci(int n);
int main()
{
atas: Algoritma
cout<<"\n\nProgram Fibonacci "<
for(int i=1;i<=n;i++)
cout<
scanf("%s",&lagi);
if (lagi=='Y'||lagi=='y')
goto atas;
else
goto bawah;
getch();
bawah:
clrscr();
printf("\n ---Makasih ^_^---\n");
cout<<"----------------------"<
int fibonacci(int n)
{
if(n==1)
return(0);
else if(n==2)
return(1);
else
return (fibonacci(n-1)+fibonacci(n-2));
}
0 comments:
Post a Comment