{$APPTYPE CONSOLE}
uses
SysUtils;
const
n=
3
;
type
gos =
record
name:
string
;
s,ch,col:
integer
;
end
;
mas=
array
[
1..
n]
of
gos;
var
i,k,k1,k2,m1,m2:
integer
;
sr, pl,col,max:
real
;
a,b:
string
;
m:mas;
begin
for
i:=
1
to
n
do
begin
writeln
(
'Enter name'
);
readln(m[i].name);
writeln
(
'Enter s,ch,col '
);
readln(m[i].s,m[i].ch,m[i].col);
end
;
sr:=
0
;
max:=
0
;
for
i:=
1
to
n
do
begin
if
(m[i].s<>
0
)
and
(m[i].ch<>
0
)
then
sr:=m[i].ch/m[i].s;
writeln
(m[i].name,
' '
,sr:
0
:
2
);
if
col>max
then
begin
max:=col;
k:=i;
end
;
end
;
writeln
(
'Max. colichestvo gorodov v gosudarstve '
,m[k].name);
writeln
(
'Enter name1'
);
readln(a);
writeln
(
'Enter name2'
);
readln(b);
k1:=
0
;
k2:=
0
;
for
i:=
1
to
n
do
if
a=m[i].name
then
begin
m1:=m[i].s;
k1:=
1
;
end
;
for
i:=
1
to
n
do
if
b=m[i].name
then
begin
m2:=m[i].s;
k2:=
1
;
end
;
if
(k1=
0
)
or
(k2=
0
)
then
writeln
(
'No this gos '
)
else
if
m1=m2
then
writeln
(
'Odinakovo'
)
else
if
m1<m2
then
writeln
(
'Ploschad '
,b,
' bolshe plo '
,a,
' na '
,m2-m1)
else
writeln
(
'Plochad '
,a,
' bolshe pl '
,b,
' na '
,m1-m2);
readln;
end
.