Предмет: Информатика,
автор: katmen
строковые и символьные данные
Даны натуральное число n, символы S1,...,Sn. Выяснить верно ли, что среди символов S1,...,Sn имеются все буквы, входящие в слово 'оценка'. язык паскаль
Ответы
Автор ответа:
0
var s:string;i:byte;o,c,e,n,k,a:boolean;
begin
readln(s);
for i:=1 to length(s) do begin
if (s[i]='о') or (s[i]='О') then o:=true;
if (s[i]='ц') or (s[i]='Ц') then c:=true;
if (s[i]='е') or (s[i]='Е') then e:=true;
if (s[i]='н') or (s[i]='Н') then n:=true;
if (s[i]='к') or (s[i]='К') then k:=true;
if (s[i]='а') or (s[i]='А') then a:=true;
end;
if o and c and e and n and k and a then
writeln('ВЕРНО')
else writeln('НЕ ВЕРНО');
end.
begin
readln(s);
for i:=1 to length(s) do begin
if (s[i]='о') or (s[i]='О') then o:=true;
if (s[i]='ц') or (s[i]='Ц') then c:=true;
if (s[i]='е') or (s[i]='Е') then e:=true;
if (s[i]='н') or (s[i]='Н') then n:=true;
if (s[i]='к') or (s[i]='К') then k:=true;
if (s[i]='а') or (s[i]='А') then a:=true;
end;
if o and c and e and n and k and a then
writeln('ВЕРНО')
else writeln('НЕ ВЕРНО');
end.
Похожие вопросы
Предмет: Другие предметы,
автор: orlovroma390
Предмет: Другие предметы,
автор: taupykmeram
Предмет: Алгебра,
автор: mariyarock333
Предмет: Алгебра,
автор: km16012001
Предмет: Математика,
автор: ytsys