建立运动会排名系统的输入部分出现问题C语言

这个是添加运动员的函数,不知道为什么运行到分数输入后就自己结束了

int add_yundongyuan(struct yundongyuan arr[],int n)        //添加联系人函数 
{
    system("cls");                //清屏 
    printf("请输入项目名称:");
    scanf("%s",arr[n].event);
    printf("请输入运动员姓名:");
    scanf("%s",arr[n].name);
    printf("请输入运动员国籍:");
    scanf("%s",arr[n].country);
    printf("请输入运动员成绩:");
    scanf("%s",arr[n].score);
    printf("添加成功!\n");
    system("pause");            //暂停界面 
    return n+1;
}

这个是主函数的一部分

int main()
{
    system("cls");
    int choice;
    int num=0;                    
    struct yundongyuan per[100];        
    do
    {
        choice=menu();
        switch(choice)
        {
        case 1:
            num=add_yundongyuan(per,num);    
            break;

求指点

score应该是浮点数或者整数吧,不能用%s输入

arr[n].score 这个是怎么定义的?可否看下

score应该是浮点数或者整数吧,不能用%s输入

题主可以看看score的类型定义,确保和%s对应起来

学习一下