Вопрос задан 18.05.2020 в 00:09.
Предмет Информатика.
Спрашивает Бака Игорь.
Удалите из символьной строки все символы, которые являются одной из четырех первых букв латинского
алфавита. На паскале помогитеОтветы на вопрос
Отвечает Новиков Дмитрий.
Var
dc:set of char;
s1,s2:string;
i:integer;
begin
dc:=['A'..'D','a'..'d'];
s1:='То avoid the impression of the tail wagging the dog, '+
'the president cannot be seen bending to the wishes of a minority.';
s2:='';
for i:=1 to length(s1) do
if not(s1[i] in dc) then s2:=s2+s1[i];
Writeln('Исходная строка: ',s1);
s1:=s2;
Writeln('Результирующая строка: ',s1)
end.
Тестовое решение:
Исходная строка: То avoid the impression of the tail wagging the dog, the president cannot be seen bending to the wishes of a minority.
Результирующая строка: То voi the impression of the til wgging the og, the presient nnot e seen ening to the wishes of minority.
dc:set of char;
s1,s2:string;
i:integer;
begin
dc:=['A'..'D','a'..'d'];
s1:='То avoid the impression of the tail wagging the dog, '+
'the president cannot be seen bending to the wishes of a minority.';
s2:='';
for i:=1 to length(s1) do
if not(s1[i] in dc) then s2:=s2+s1[i];
Writeln('Исходная строка: ',s1);
s1:=s2;
Writeln('Результирующая строка: ',s1)
end.
Тестовое решение:
Исходная строка: То avoid the impression of the tail wagging the dog, the president cannot be seen bending to the wishes of a minority.
Результирующая строка: То voi the impression of the til wgging the og, the presient nnot e seen ening to the wishes of minority.
Топ вопросов за вчера в категории Информатика
Информатика 19
Последние заданные вопросы в категории Информатика
Предметы
-
Математика
-
Литература
-
Алгебра
-
Русский язык
-
Геометрия
-
Английский язык
-
Химия
-
Физика
-
Биология
-
Другие предметы
-
История
-
Обществознание
-
Окружающий мир
-
География
-
Українська мова
-
Информатика
-
Українська література
-
Қазақ тiлi
-
Экономика
-
Музыка
-
Право
-
Беларуская мова
-
Французский язык
-
Немецкий язык
-
МХК
-
ОБЖ
-
Психология
-
Физкультура и спорт
-
Астрономия
-
Кыргыз тили
-
Оʻzbek tili
