/ Vijos /

记录详情

Compile Error

foo.c:1:1: error: unknown type name 'var'
    1 | var
      | ^~~
foo.c:3:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    3 | ans:integer;
      |    ^
foo.c:4:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    4 | s:string;
      |  ^
foo.c:5:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    5 | ch:char;
      |   ^
foo.c:6:1: error: unknown type name 'begin'
    6 | begin
      | ^~~~~
foo.c:7:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    7 | ans:=0;
      |    ^
foo.c:8:1: warning: data definition has no type or storage class
    8 | read(s);
      | ^~~~
foo.c:8:1: warning: type defaults to 'int' in declaration of 'read' [-Wimplicit-int]
foo.c:8:1: warning: parameter names (without types) in function declaration
foo.c:9:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    9 | ans:=ans+(ord(s[1])-48)*1+(ord(s[3])-48)*2+(ord(s[4])-48)*3+(ord(s[5])-48)*4;
      |    ^
foo.c:10:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   10 | ans:=ans+(ord(s[7])-48)*5+(ord(s[8])-48)*6+(ord(s[9])-48)*7+(ord(s[10])-48)*8;
      |    ^
foo.c:11:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   11 | ans:=ans+(ord(s[11])-48)*9;
      |    ^
foo.c:12:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   12 | ans:=ans mod 11;
      |    ^
foo.c:13:1: error: expected identifier or '(' before 'if'
   13 | if ans=10 then ch:='X' else ch:=chr(ans+48);
      | ^~
foo.c:14:1: error: expected identifier or '(' before 'if'
   14 | if ch=s[13] then write('Right')
      | ^~
foo.c:14:24: warning: character constant too long for its type
   14 | if ch=s[13] then write('Right')
      |                        ^~~~~~~
foo.c:15:33: warning: data definition has no type or storage class
   15 | else begin write(copy(s,1,12)); writeln(ch);end;
      |                                 ^~~~~~~
foo.c:15:33: warning: type defaults to 'int' in declaration of 'writeln' [-Wimplicit-int]
foo.c:15:1: warning: parameter names (without types) in function declaration
   15 | else begin write(copy(s,1,12)); writeln(ch);end;
      | ^~~~
foo.c:15:45: warning: data definition has no type or storage class
   15 | else begin write(copy(s,1,12)); writeln(ch);end;
      |                                             ^~~
foo.c:15:45: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
foo.c:16:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   16 | end.
      |    ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1484 ISBN号码
语言
C
递交时间
2023-12-28 20:17:50
评测时间
2023-12-28 20:17:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes