I am not getting the mistake in my code plz help me:
code:
using namespace std;
#include
int main()
{
int t;
cin>>t;
while(t–)
{
int n,count=0,max=0,inc=1;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
cin>>a[i];
for(int i=1;i<n;i++)
{
//increasing then decreasing
if(a[i]>=a[i-1] && inc==1)
count++;
//decreasing
else if(a[i]<=a[i-1])
{
count++;
inc=0;
}
//find another subarray;
else
{
if(count>max)
max=count;
count=0,inc=1;
--i;
}
}
if(count>max)
max=count;
cout<<++max<<endl;
}
}