Given an array arr of n positive integers lesser than 1000, check if there exists at least one subarray, the product of whose elements is a power of

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

int countsubarray(int array[], int n)
{
int count = 0;
int i, j, mul;

for (i = 0; i < n; i++) 
{ 
    if (array[i] == pow(2,i))
        count++; 

    mul = array[i]; 

    for (j = i + 1; j < n; j++)  
    { 

        mul = mul * array[j];  
        if (mul <= pow(2,i))
            count++;  
        else
            break;  
    } 
} 

return count; 

}

int main()
{ int n;
cin>>n;
while(n<=99)
{
int array[n];
for(int i=0;i<n;i++)
{
cin>>array[i];
}
int count = countsubarray(array, n);
if(count>=1)
{
cout<<“1”<<endl;
}
else
{

cout<<"0"<<endl;
}

}
return 0;
}
pls tell my errrors