Добавил:
Источник:
Uman
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:01 семестр / К экзамену-зачёту / Все задачи с экзамена в формате PAS / Alex / ALEX2
.PAS 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.
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