为什么我想一个数组输入数,为什么必须要多输入一个数,循环才能出来

#include
#define SIZE 10
#define PAR 72

int main(void) {
int index, score[SIZE];
int sum = 0;
float average;

printf("Enter %d golf scores :\n", SIZE);
for (index = 0; index < SIZE; ++index)
    scanf_s("%d ", &score[index]);


printf("The scores read in are as follws :\n");
for (index = 0; index < SIZE; index++)
    printf("%5d \n", score[index]);
for (index = 0; index < SIZE; index++)
    sum += score[index];
average = (float)sum / SIZE;
printf("Sum of scores =%d ,average=%.2f\n", sum, average);
printf("That's a handicap of %.0f.\n", average - PAR);
getchar();
return 0;

}

需要输入11个数字 才能继续运行

scanf是格式化输入语句,接收字符"%d "中有一个空格,所以你输入的每一个数字应该是(数字+空格)的格式,才能被接收,最后你输入第十个没结束循环,是因为还没有输入空格,你可以直接把"%d "中的空格去掉("%d"),接收的数字默认以空格分割

C的输入输出不是scanf和printf?scanf_s没怎么用,而且你可断下点,看看++index