Max circular sum

#include
using namespace std;
int main() {

int  n;
cin>>n;
for (int i=1;i<=n;i++);
{
  int r,t,cursum=0,maxsum;
  cin>>r;
  t=2*r;
  int a[r],p[t];
  for (int j=0;j<r;j++)
  {
    cin>>a[j];
  }
  
  for (int k=0;k<r;k++)
  {p[k]=a[k];}
  
  for (int h=r;h<t;h++)
  {p[h]=a[h-r];}

  
 
  for (int m=0;m<r;m++)
  {
      cursum=a[m];
      maxsum=a[m];
      
      for (int q=m+1;q<r+m;q++)
      {
      cursum=p[q]+cursum;
      
      if (cursum>maxsum)
      {maxsum=cursum;}
      }

      
  }  

  cout<<maxsum;  
 
}

return 0;
}

anyone there ?? hello

@notacoderyet Save your code on ide.codingblocks.com and share its link and also mention your problem.

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.