c语言,但Compile Error(编译错误)……
查看原帖
c语言,但Compile Error(编译错误)……
1031870
yxy0108楼主2023/8/13 20:11

##qaq

#include <stdio.h>
int main(){
    struct student{
        int f;
        char name[25];
    };
    student s[105];
    int p,max=0,maxx;
    scanf("%d",&p);
    for(int i=0;i<p;i++){
        scanf("%d",s[i].f);
        scanf("%s",name);
        if(s[i].f>max){
            max=s[i].f;
            maxx=i;
        }
    }
    printf("%s"s[maxx].name);
    return 0;
}
2023/8/13 20:11
加载中...