你的代码有点乱。
将“scanf("%d",&score[i]); /*输入数据*/”删除。
将while((score[i]=getchar())!='a')改为while(scanf("%d",&score[i])==1),以后输入任何非数字字符都结束。
将while(...)的最后一个}前的scanf("%d",&score[i]);改为i++;。
i++怎么没有,没i++你判断的一直是a[0]啊