All Test Cases Failed

when i compile and run this code then its worked but when i submit then the all the test cases shows no output

#include
using namespace std;

int kadane(int a[], int n);

int maxCircularSum(int a[], int n)
{

int max_kadane = kadane(a, n);

int max_wrap = 0, i;
for (i = 0; i < n; i++)
{
        max_wrap += a[i];
        a[i] = -a[i];
}

max_wrap = max_wrap + kadane(a, n);

return (max_wrap > max_kadane)? max_wrap: max_kadane;

}

int kadane(int a[], int n)
{
int max_so_far = 0, max_ending_here = 0;
int i;
for (i = 0; i < n; i++)
{
max_ending_here = max_ending_here + a[i];
if (max_ending_here < 0)
max_ending_here = 0;
if (max_so_far < max_ending_here)
max_so_far = max_ending_here;
}
return max_so_far;
}

int main()
{
int m;
cin>>m;
int n;
cin>>n;

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

cout << maxCircularSum(a, n) << endl;
m++;
return 0;

}
}

hey @be8036 you are not dealing with test cases correctly you should take number of test cases as input then write a loop that runs as many times as the test cases mentioned and then start taking n as input. Here is your code adjusted according to the same.