uses crt const type person record name string 50 group integer math bo

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
uses crt;
const n=2;
type person=record
name :string[50];
group :integer;
math :boolean;
fiz :boolean;
info :boolean;
history : boolean;
meteo : boolean;
point :integer;
end;
var list:text;
s :string;
i,j,k:integer;
table :array[1..n] of person;
procedure dis_e(s:string);
begin
write(s+'?');Readln(k);
write(list,s);
if k=1 then
writeln(list,' 1')
else
writeln(list,'');
end;
begin
assign(list,'list.txt');
rewrite(list);
for i:=1 to n do begin
write('Name:'); Readln(s);
writeln(list,s);
write('Group:'); Readln(s);
writeln(list,s);
dis_e('math');
dis_e('fiz');
dis_e('info');
dis_e('history');
dis_e('meteo');
write('Point: '); Readln(s);
write(list,s);
end;
reset(list);
for i:=1 to n do
for i:=1 to 8 do begin
end;
end;
reset(list);
for i:=1 to 8 do begin
readln(list,s);
if s[length(s)] = '1' then begin
delete(s,length(s),1);
writeln(s);
end;
end;
close(list);
end.