назад
  
uses crt;
type
rec=record
name:string[15];
f:0..5;
m:0..5;
i:0..5;
end;
sred=array[1..50] of real;
names=array[1..50] of string[15];
Var
A:rec; b:file of rec; c,i,n:integer; z,k:real; x:sred; y:names;

begin
clrscr;
window(10,10,100,100);
assign(b,'D:\001.pas');
rewrite(b);
writeln('vvedite 4islo y4-kov');
readln(n); k:=0; z:=0; c:=0;
for i:=1 to n do
begin
writeln('vvedite familiu');
readln(A.name);
writeln('ostenki to fiz mat i inf');
readln(A.f);
readln(A.m);
readln(A.i);
k:=(A.f+A.m+A.i)/3;
x[i]:=k;
y[i]:=A.name;
z:=k+z;
end;

z:=z/n;
for i:=1 to n do;
begin
A.name:=y[i];
if z<x[i] then begin write(b,A); c:=c+1 end;
end;
close(b);
textcolor(4);
reset(b); for i:=1 to c do
begin
read(b,A); writeln(A.name); end;
close(b); readkey;
end.
Hosted by uCoz