This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
2024-03-10 20:32:51 +03:00

26 lines
506 B
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Цикл for. Поиск значения. Оператор break
const n = 10;
var
k: integer;
found: boolean;
begin
writeln('Введите число для поиска: ');
readln(k);
writelnFormat('Введите {0} чисел',n);
found := False;
for var i:=1 to n do
begin
var x: integer;
read(x);
if x=k then
begin
found := True;
break;
end;
end;
if found then
writeln('Найдено')
else writeln('Не найдено');
end.