/ Vijos /

记录详情

Compile Error

foo.c:2:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 include<stdio.h> 
        ^
foo.c: In function 'main':
foo.c:9:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
 scanf("%d",&n);
 ^
foo.c:9:1: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
foo.c:9:13: error: 'n' undeclared (first use in this function)
 scanf("%d",&n);
             ^
foo.c:9:13: note: each undeclared identifier is reported only once for each function it appears in
foo.c:10:1: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[52]' [-Wformat=]
 for(int i=0;i<n;i++) { int money=0; scanf("%s",&name[i]); scanf("%d %d %s %s %d",&final,&clas,&s,&w,&c); t=s=='Y'?1:0; e=w=='Y'?1:0; if ((final>80)&&(c>0)) money+=8000;
 ^
foo.c:10:83: error: 'final' undeclared (first use in this function)
 for(int i=0;i<n;i++) { int money=0; scanf("%s",&name[i]); scanf("%d %d %s %s %d",&final,&clas,&s,&w,&c); t=s=='Y'?1:0; e=w=='Y'?1:0; if ((final>80)&&(c>0)) money+=8000;
                                                                                   ^
foo.c:10:90: error: 'clas' undeclared (first use in this function)
 for(int i=0;i<n;i++) { int money=0; scanf("%s",&name[i]); scanf("%d %d %s %s %d",&final,&clas,&s,&w,&c); t=s=='Y'?1:0; e=w=='Y'?1:0; if ((final>80)&&(c>0)) money+=8000;
                                                                                          ^
foo.c:10:96: error: 's' undeclared (first use in this function)
 for(int i=0;i<n;i++) { int money=0; scanf("%s",&name[i]); scanf("%d %d %s %s %d",&final,&clas,&s,&w,&c); t=s=='Y'?1:0; e=w=='Y'?1:0; if ((final>80)&&(c>0)) money+=8000;
                                                                                                ^
foo.c:10:99: error: 'w' undeclared (first use in this function)
 for(int i=0;i<n;i++) { int money=0; scanf("%s",&name[i]); scanf("%d %d %s %s %d",&final,&clas,&s,&w,&c); t=s=='Y'?1:0; e=w=='Y'?1:0; if ((final>80)&&(c>0)) money+=8000;
                                                                                                   ^
foo.c:10:102: error: 'c' undeclared (first use in this function)
 for(int i=0;i<n;i++) { int money=0; scanf("%s",&name[i]); scanf("%d %d %s %s %d",&final,&clas,&s,&w,&c); t=s=='Y'?1:0; e=w=='Y'?1:0; if ((final>80)&&(c>0)) money+=8000;
                                                                                                      ^
foo.c:20:1: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
 printf("%s\n%d\n%d",name[j],max,all);
 ^
foo.c:20:1: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
foo.c:8:17: warning: unused variable 'len' [-Wunused-variable]
 int all=0,max=0,len=0,t,e,j;
                 ^

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C
递交时间
2016-12-06 16:42:02
评测时间
2016-12-06 16:42:04
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes