Why run time error occur int this problem

//why this prob. gives me a run-error??

#include
using namespace std;
int main(){
int times;
cin>>times;
while(times!=0){
int n;
cin>>n;
int arr[100];
int cs =0 , ms = 0;
for(int i=0; i<n; i++){
cin>>arr[i];
}

//Kadane's Algorithms
for(int i=0; i<n; i++){
	cs = cs + arr[i];
	if(cs<0){
		cs = 0;
	}
	ms =  max(cs , ms);
}
cout<<ms<<endl;
times = times -1;

}
return 0;
}

@rajsaxena.personal
hello raj,
declare ur array of size n