
Ипатий
7 год назад
Кто понимает Паскаль? Срочно нужна ваша помощь в решении задач школьным способом. Прошу, помогите!!

ОТВЕТЫ

Сибирский
Jul 15, 2019
3)
var
i: integer;
s: string;
begin
readln(s);
i := 1;
while (s[i] lt;gt; :) do
begin
write(s[i]);
i := i + 1;
end;
end.
4)
var
i: integer;
s: string;
begin
readln(s);
i := 1;
while i lt; s.Length do
begin
if(s[i] = ) then s[i] := .;
if(s.Length - i gt; 2) then if(s[i] = .) and (s[i + 1] = .) and (s[i + 2] = .) then begin
delete(s, i + 1, 2);
end;
if(s.Length - i gt; 2) and (i gt; 2) then if(s[i - 1] = .) and (s[i] = .) and (s[i + 1] = .) then
begin
delete(s, i + 1, 2);
end;
i := i + 1;
end;
writeln(s);
end.
var
i: integer;
s: string;
begin
readln(s);
i := 1;
while (s[i] lt;gt; :) do
begin
write(s[i]);
i := i + 1;
end;
end.
4)
var
i: integer;
s: string;
begin
readln(s);
i := 1;
while i lt; s.Length do
begin
if(s[i] = ) then s[i] := .;
if(s.Length - i gt; 2) then if(s[i] = .) and (s[i + 1] = .) and (s[i + 2] = .) then begin
delete(s, i + 1, 2);
end;
if(s.Length - i gt; 2) and (i gt; 2) then if(s[i - 1] = .) and (s[i] = .) and (s[i + 1] = .) then
begin
delete(s, i + 1, 2);
end;
i := i + 1;
end;
writeln(s);
end.
16