const n=5;
type
sved=record
marka:string[10];
l_sil:integer;
P_mest:integer;
end;
var
F:File of sved;
avto:sved;
i,kol:integer;
Procedure marka;
begin
assign(F,’avto.dat’);
reset(f);
writeln(’vvedite marku’);
readln(marka);
kol:=0;
while not (eof(f)) do
begin
read(F,avto);
if avto.marka=marka then
kol:=kol+1;
end;
close(f);
end;
Procedure zapolnenie;
begin
assign(F,’avto.dat’);
rewrite(F);
for i:=1 to n do
begin
writeln(’vvedite marku avto’);
readln(avto.marka);
writeln(’vvedite kol-vo loshd sil’);
readln(avto.l_sil);
writeln(’vvedite kol-vo posad mest’);
readln(avto.p_mest);
writeln(F,avto);
end;
end;
begin
zapolnenie;marka;
writeln(kol-vo mashin zadannoi marki -,kol);
readln;
end.