基础题。
#include <cstdio>
const int MAXN = 1005;
int score[MAXN]; //所有成绩
int main()
{
int N;
while (scanf("%d", &N))
{
if (N == 0)
break;
for (int i = 0; i < N; i++)
{
scanf("%d", &score[i]);
}
int target; //目标成绩
scanf("%d", &target);
int total = 0; //目标成绩的人数
for (int i = 0; i < N; i++)
{
if (score[i] == target)
++total;
}
printf("%d\n", total);
}
return 0;
}
继续加油。