/ Vijos /

记录详情

Compile Error

/in/foo.c:1:9: error: #include expects "FILENAME" or <FILENAME>
 #include
         ^
/in/foo.c: In function 'main':
/in/foo.c:37:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
 scanf("%d %d",&max,&tishu);
 ^~~~~
/in/foo.c:37:1: warning: incompatible implicit declaration of built-in function 'scanf'
/in/foo.c:37:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
/in/foo.c:41:9: error: 'imax' undeclared (first use in this function); did you mean 'max'?
 for(i=0;imax)
         ^~~~
         max
/in/foo.c:41:9: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:41:13: error: expected ';' before ')' token
 for(i=0;imax)
             ^
/in/foo.c:52:6: error: expected expression before ':' token
 for(;:wink:
      ^
/in/foo.c:94:1: error: expected expression before 'if'
 if(flag)right++;
 ^~
/in/foo.c:96:1: error: expected expression before '}' token
 }
 ^
/in/foo.c:50:5: warning: unused variable 'flag' [-Wunused-variable]
 int flag=1;
     ^~~~
/in/foo.c:39:7: warning: unused variable 'right' [-Wunused-variable]
 int i,right=0;
       ^~~~~
/in/foo.c:39:5: warning: variable 'i' set but not used [-Wunused-but-set-variable]
 int i,right=0;
     ^
/in/foo.c: At top level:
/in/foo.c:98:8: error: expected declaration specifiers or '...' before string constant
 printf("%d",(int)(1000.0/tishu*right));
        ^~~~
/in/foo.c:98:13: error: expected declaration specifiers or '...' before '(' token
 printf("%d",(int)(1000.0/tishu*right));
             ^
/in/foo.c:100:1: error: expected identifier or '(' before 'return'
 return 0;
 ^~~~~~
/in/foo.c:102:1: error: expected identifier or '(' before '}' token
 }
 ^

信息

递交者
类型
递交
题目
P1300 儿子游戏机
语言
C
递交时间
2017-09-23 15:55:10
评测时间
2017-09-23 15:55:10
评测机
分数
0
总耗时
17ms
峰值内存
2.91 MiB