/in/foo.c:1:1: error: unknown type name 'var'; did you mean 'char'?
var
^~~
char
/in/foo.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
n,k,i,o,t:longint;
^
/in/foo.c:3:1: error: unknown type name 'begin'
begin
^~~~~
/in/foo.c:4:3: warning: parameter names (without types) in function declaration
read(n,k);
^~~~
/in/foo.c:5:3: error: expected identifier or '(' before 'for'
for i:=1 to n do
^~~
/in/foo.c:8:7: error: expected identifier or '(' before 'while'
while o<>0 do
^~~~~
/in/foo.c:11:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
o:=o div 10;
^
/in/foo.c:12:9: warning: data definition has no type or storage class
end;
^~~
/in/foo.c:12:9: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
/in/foo.c:13:5: warning: data definition has no type or storage class
end;
^~~
/in/foo.c:13:5: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
/in/foo.c:14:3: warning: data definition has no type or storage class
write(t);
^~~~~
/in/foo.c:14:3: warning: type defaults to 'int' in declaration of 'write' [-Wimplicit-int]
/in/foo.c:14:3: warning: parameter names (without types) in function declaration
/in/foo.c:15:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
end.
^