Дана строка. Определить, есть ли в ней буква s — Pascal(Паскаль)

Program string_15;

uses crt;

var
  t: string;
  i: integer;
  ot: boolean;

begin
  clrscr;
  writeln('введите текст:');
  readln(t);
  for i := 1 to length(t) do
    if t[i] = 's' then
      ot := true;
  if ot = true then
    write('да')
  else
    write('нет');
  readln;

end.

Leave a Comment

− 1 = 1