#include <iostream>
usingnamespace std;
int main(){
int T, N, i=0, j=0, A[i], S[j];
cout<<"###### R-Boy's party ######"<<endl;
do{
cout<<"Enter the amount of test cases to do (between 1 and 1.000)\n";
cin>>T;
if(T<1 or T>1000)
cout<<"Invalid number! Enter a number between 0 and 1.000\n";
}while(T<1 or T>1000);
for(j=0; j<T; j++){
system("CLS");
cout<<"case #"<<j+1<<endl<<endl;
S[j]=0;
do{
cout<<"enter the number of R-Boy's friends (between 1 and 1.000)\n";
cin>>N;
if(N<1 or N>1000)
cout<<"Invalid number! Enter a number between 0 and 1.000\n";
}while(N<1 or N>1000);
cout<<"\nenter the number of the "<<N<<" R-boy's friends degree of friendship (between -1.000 and 1.000)\n";
for(i=0; i<N; i++){
do{
cin>>A[i];
if(A[i]<-1000 or A[i]>1000)
cout<<"Invalid number! Enter a number between -1.000 and 1.000\n";
}while(A[i]<-1000 or A[i]>1000);
if(A[i]>0)
S[j]+=A[i];
}
}
system("CLS");
for(i=0; i<T; i++){
cout<<"case #"<<i+1<<": "<<S[i]<<endl;
}
return 0;
}
the program can't recognize the 10th value, "10" in this case. please help