/ Vijos /

记录详情

Compile Error

foo.c: In function ‘main’:
foo.c:4:6: error: expected ‘;’ before ‘char’
    4 | int n
      |      ^
      |      ;
    5 | char maxName[25]
      | ~~~~  
foo.c:5:17: error: expected ‘;’ before ‘int’
    5 | char maxName[25]
      |                 ^
      |                 ;
    6 | int maxMoney=-1
      | ~~~              
foo.c:7:1: error: expected ‘,’ or ‘;’ before ‘int’
    7 | int totalSum=0
      | ^~~
foo.c:9:5: error: ‘inti’ undeclared (first use in this function); did you mean ‘int’?
    9 | for(inti=0;i<n;i++){
      |     ^~~~
      |     int
foo.c:9:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:9:12: error: ‘i’ undeclared (first use in this function)
    9 | for(inti=0;i<n;i++){
      |            ^
foo.c:9:14: error: ‘n’ undeclared (first use in this function)
    9 | for(inti=0;i<n;i++){
      |              ^
foo.c:10:40: error: expected identifier or ‘(’ before ‘char’
   10 | char name[25];int avg,classScore,paper,char isLeader,isWest;int money=0;
      |                                        ^~~~
foo.c:11:54: error: ‘isLeader’ undeclared (first use in this function)
   11 | scanf("%s%d%d%d%c%c%d",name,&avg,&classScore,&paper,&isLeader,&isWest);
      |                                                      ^~~~~~~~
foo.c:11:64: error: ‘isWest’ undeclared (first use in this function)
   11 | scanf("%s%d%d%d%c%c%d",name,&avg,&classScore,&paper,&isLeader,&isWest);
      |                                                                ^~~~~~
foo.c:22:1: error: ‘totalSum’ undeclared (first use in this function)
   22 | totalSum+=money;
      | ^~~~~~~~
foo.c:25:8: error: ‘maxName’ undeclared (first use in this function)
   25 | strcpy(maxName,name);}
      |        ^~~~~~~
foo.c:30:7: error: expected expression before ‘=’ token
   30 | return=0;
      |       ^

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C
递交时间
2026-10-16 22:38:44
评测时间
2026-10-16 22:38:44
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes