There is some problem

#include
using namespace std;
int kadane(int a[],int n){
int maxi=0,curr=0;
for(int i=0;i<n;i++){
int conti=curr+a[i];
int newi=a[i];
curr=max(conti,newi);
maxi=max(curr,maxi);
}
return maxi;
}
int maximum_circular(int a[],int n){
int maximum;
int kadane_sum=kadane(a,n);
int wrap_sum=0;
for(int i=0;i<n;i++){
wrap_sum+=a[i];
a[i]=-a[i];
}
wrap_sum=wrap_sum+kadane(a,n);
if(wrap_sum>kadane_sum){
maximum=wrap_sum;
}
else{
maximum=kadane_sum;
}
return maximum;
}
int main(){
int t,ans;
cin>>t;
while(t–){
int n;

	cin>>n;
	int a[n];
	for(int i=0;i<n;i++){

		cin>>a[i];

	}
	ans=maximum_circular(a,n);
    cout<<ans<<"\n";
    return 0;
}

}

write return 0, outside the while loop

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.