Скачиваний:
329
Добавлен:
04.03.2014
Размер:
1 Кб
Скачать
program Alex;
uses crt;
type a=record
     name,class:string;
     mark:array[1..3] of integer;
     end;
     z=array[1..3] of a;
var x:z;
    r:string;
    p,n:integer;
    o:real;
    f:text;
    t:array [1..3] of boolean;

begin
clrscr;
for n:=1 to 3 do begin
textcolor (Blue);
write ('‚ўҐ¤ЁвҐ €¬п',n,'-Ј® г祭ЁЄ : ');
readln (x[n].name);

textcolor (green);
write ('‚ўҐ¤ЁвҐ ҐЈ® Є« бб: ');
readln (x[n].class);

textcolor (magenta);
for p:=1 to 3 do begin
                 write ('‚ўҐ¤ЁвҐ ',p,'-го ®жҐ­Єг: ');
                 readln (x[n].mark[p]);
                 if x[n].mark[p]=3 then t[n]:=true else t[n]:=false;
                 end;
writeln;
end;

write ('‚ўҐ¤ЁвҐ Ё¬п д ©«  ¤ ­­ле: ');
readln (r);
assign (f,r);
rewrite (f);
writeln (f,'----------†га­ « г祭ЁЄ®ў----------');
for n:=1 to 3 do begin
if t[n]:=TRUE then begin
                  writeln (f,'');
                  writeln (f,'€¬п: ',x[n].name);
                  writeln (f,'Љ« бб: ',x[n].class);
                  o:=0;
                  for p:=1 to 3 do o:=o+x[n].mark[p];
                  o:=o/3;
                  writeln (f,'‘।­Ё© Ў ««: ',o:5:2);
                  end;
end;
close (f);
end.
Соседние файлы в папке Alex