Class Assignment what is the problem in this code

#include
#include
using namespace std;
char arr[15]={‘a’,‘b’};
char ans[50];
void permution(int n,int i,int j,char ans[50],int &count){
if(i==n){
ans[j]=’\0’;
if(n==1){
count++;

	 return;
 }

for(int k=0;k<=n-1;k++){
if(ans[k]==‘b’ && ans[k+1]==‘b’){

	return;
}

}

count++;

 return;

}

 ans[j]=arr[0];
 permution(n,i+1,j+1,ans,count);
 ans[j]=arr[1];
 permution(n,i+1,j+1,ans,count);

}
int main() {
int t;
cin>>t;
while(t–){
int n;
cin>>n;

	int count=0;
	permution(n,0,0,ans,count);
	cout<<"#"<<n<<" : "<<count<<endl;
}
return 0;

}

hi @kumawatnitesh093 refer this (this follows fibonacci no sequence)

#include <bits/stdc++.h>
using namespace std;

long long int fib(long long int n)
{
    if (n <= 1)
        return n;

    return fib(n - 1) + fib(n - 2);
}

int main()
{
    int testCases;
    cin >> testCases;
    int k = 1;

    while (testCases--)
    {
        int n;
        cin >> n;
        cout << "#" << k++ << " : " << fib(n+2) << endl;
    }

    return 0;
}