var B: array [1..7] of integer;
i: integer;
begin
for i := 1 to 7 do
write('Введите ', i, ' элемент: ');
readln(B[i]);
end;
for i := 7 downto 1 do
if B[i] = 5 then
writeln(i);
break;
end.
var B: array [1..7] of integer;
i: integer;
begin
for i := 1 to 7 do
begin
write('Введите ', i, ' элемент: ');
readln(B[i]);
end;
for i := 7 downto 1 do
if B[i] = 5 then
begin
writeln(i);
break;
end;
end.