const n=5;
a:array[1..n] of string = ('Москва','Владимир','Воронеж','Архангельск','Екатеринбург');
var i,m,mi: integer;
begin
m:=length(a[1]);
mi:=1;
for i:=2 to n do if length(a[i])>m then
m:=length(a[i]);
mi:=i
end;
writeln;
writeln(a[mi])
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
const n=5;
a:array[1..n] of string = ('Москва','Владимир','Воронеж','Архангельск','Екатеринбург');
var i,m,mi: integer;
begin
m:=length(a[1]);
mi:=1;
for i:=2 to n do if length(a[i])>m then
begin
m:=length(a[i]);
mi:=i
end;
writeln;
writeln(a[mi])
end.