/in/foo.cc:1:1: error: 'var' does not name a type
var
^~~
/in/foo.cc:3:1: error: 'k' does not name a type
k,x1,x2,x3,x4,i1,i2,i3,i4,v:longint;
^
/in/foo.cc:4:1: error: 'begin' does not name a type
begin
^~~~~
/in/foo.cc:6:1: error: 'max' does not name a type
max:=maxlongint;
^~~
/in/foo.cc:7:1: error: expected unqualified-id before 'for'
for i1:=0 to 10 do
^~~
/in/foo.cc:14:1: error: 'sum' does not name a type
sum:=(20-i1*2)*x1+(100-i2*7)*x2*2/v+(100-i3*9)*x3/v;
^~~
/in/foo.cc:15:1: error: expected unqualified-id before 'if'
if (sum<max) and (v>0) then max:=sum;
^~
/in/foo.cc:16:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:17:8: error: expected constructor, destructor, or type conversion before '(' token
writeln(max:0:3);
^
/in/foo.cc:18:1: error: 'end' does not name a type
end.
^~~