#include
using namespace std;
int main(){
int t;
cin>>t;
if(t>=1 and t<=20){
while(t–){
int n;
cin>>n;
int a[1000];
int maximumSum=0;
int currentSum=0;
// int cumSum[100]={0};
for(int i=0;i<n;i++){
cin>>a[i];
}
for (int i=0;i<n;i++){
currentSum+=a[i];
if(currentSum<0){
currentSum=0;
}
if(currentSum>maximumSum){
maximumSum=currentSum;
}
}
cout<<maximumSum<<endl;
}
}
return 0;
}
In this code it shows run error ,I couldn’t identify it.please help me.