Ответ:x=12 y=0
x=6+6+4+0-4+0+0+2+2-4=12
y=0+0+0+4+0-4+4+2-2-4=0
Вот так у меня получилось
Var
l,i:integer;
s,w:string;
prt:boolean;
c:char;
begin
{ s:=' Арбуз вагон барабан Goodday dummy. '; }
Write('Введите строку: ');
Readln(s);
l:=Pos('.',s);
s:=Copy(s,1,l-1)+' ';
i:=1;
prt:=False;
w:='';
while i<=l do
begin
c:=s[i];
if c=' ' then
begin
if prt then
begin
if Length(w)>2 then Write(Copy(w,1,Length(w)-2),' ');
w:='';
prt:=not prt
end
end
else
begin
w:=w+s[i];
prt:=True
end;
Inc(i)
end;
Writeln
end.
1) a) 18; б) -20; в) -5.
2) a) -25 < 15; б) -18 < -8.
3) -4, -3, -2, -1, 0, 1, 2.
4) a) 7; б) -11; -1.