Кто понимает Паскаль? Срочно нужна ваша помощь в решении задач школьным способом. Прошу, помогите!!
Приложения:
Ответы
Ответ дал:
0
3)
var
i: integer;
s: string;
begin
readln(s);
i := 1;
while (s[i] <> ':') do
begin
write(s[i]);
i := i + 1;
end;
end.
4)
var
i: integer;
s: string;
begin
readln(s);
i := 1;
while i < s.Length do
begin
if(s[i] = ' ') then s[i] := '.';
if(s.Length - i > 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 > 2) and (i > 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] <> ':') do
begin
write(s[i]);
i := i + 1;
end;
end.
4)
var
i: integer;
s: string;
begin
readln(s);
i := 1;
while i < s.Length do
begin
if(s[i] = ' ') then s[i] := '.';
if(s.Length - i > 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 > 2) and (i > 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.
Ответ дал:
0
Спасибо, что уделили свое время! Вы очень помогли!
Вас заинтересует
2 года назад
2 года назад
7 лет назад
7 лет назад
9 лет назад
9 лет назад
10 лет назад
10 лет назад