foo.cpp:13:26: warning: multi-character character constant [-Wmultichar]
if i<>1 then write('x^',i) else write('x');
^
foo.cpp:1:1: error: 'var' does not name a type
var k,n,i:integer;
^
foo.cpp:2:6: error: found ':' in nested-name-specifier, expected '::'
f:boolean;
^
foo.cpp:2:5: error: 'f' does not name a type
f:boolean;
^
foo.cpp:3:1: error: 'begin' does not name a type
begin
^
foo.cpp:5:3: error: 'f' does not name a type
f:=true;
^
foo.cpp:6:3: error: expected unqualified-id before 'for'
for i:=n downto 1 do
^
foo.cpp:9:7: error: expected unqualified-id before 'if'
if k=0 then continue;
^
foo.cpp:10:7: error: expected unqualified-id before 'if'
if (not f) and (k>0) then write('+');
^
foo.cpp:11:7: error: expected unqualified-id before 'if'
if k<0 then write('-');
^
foo.cpp:12:7: error: expected unqualified-id before 'if'
if abs(k)<>1 then write(abs(k));
^
foo.cpp:13:7: error: expected unqualified-id before 'if'
if i<>1 then write('x^',i) else write('x');
^
foo.cpp:14:7: error: 'f' does not name a type
f:=false;
^
foo.cpp:15:5: error: 'end' does not name a type
end;
^
foo.cpp:16:9: error: expected constructor, destructor, or type conversion before '(' token
readln(k);
^
foo.cpp:17:3: error: expected unqualified-id before 'if'
if k<>0 then
^
foo.cpp:18:38: error: 'f' does not name a type
if k>0 then begin writeln('+',k);f:=false; end
^
foo.cpp:18:48: error: 'end' does not name a type
if k>0 then begin writeln('+',k);f:=false; end
^
foo.cpp:19:34: error: 'f' does not name a type
else begin writeln(k);f:=false;end;
^
foo.cpp:19:43: error: 'end' does not name a type
else begin writeln(k);f:=false;end;
^
foo.cpp:20:3: error: expected unqualified-id before 'if'
if f then writeln('0');
^
foo.cpp:21:1: error: 'end' does not name a type
end.
^