Submit code is not showing any output

#include

using namespace std;
int main() {
int n,n1,cs,ms,arr[100000];
cin>>n1;
for(int i3=0;i3<n1;i3++)
{
ms=-1000;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
for(int i=0;i<n;i++)
{
for(int j=i;j<n;j++)
{
cs=0;
for(int k=i;k<=j;k++)
{
cs+=arr[k];
}
ms=max(cs,ms);
}
}
cout<<ms<<endl;
}
return 0;
}

Can you pls tell why you have use 3 loops for I , j and k …since you can solve this question using kadane’s algorithm, given in online lecture of your course…