用标记来控制输入的数量啊;
int number;
cin>>number;
while(number!=-1)//用-1做标记
{
int counter1=0,counter2=0,counter3=0,counter4=0,counter5=0;
if(score>=90) counter1++;
if(score>=80&&score<=89) counter2++;
if(score>=70&&score<=79) counter3++;
if(score>=60&&score<=69) counter4++;
if(score<60) counter5++;
cin>>number;
}