program laba ;
type
pol = (m, f);
place = (gorod, selo);
yes_no = (da, net);
people = record
fam: string[20];
imya: string[20];
godro: 1900..2011;
mesto: place;
obwejitie: yes_no;
grupp: 101..103;
case mw:pol of
m: (voen: boolean);
f: (merry: boolean);
end;
var
student: array [1..100] of people;
i, n, count: integer;
ans : integer;
begin
writeln ('vvedite kol-vo studentov');
readln (n);
for i:=1 to n do
with student[i] do
begin
writeln ('vvedite svediniya o', I , '-m studente');
writeln ('vvedite familiy');
readln(fam);
writeln ('vvedite imya');
readln(imya);
writeln ('vvedite god rozdeniya (1900-2011)');
readln(godro);
writeln ('mesto : (0 = gorod; 1 = selo)');
readln(ans); mesto := place(ans);
writeln ('obwejitie : (0 = nado; 1 = nenado)');
readln(ans);
obwejitie := yes_no(ans);
writeln ('pol : (0 = male; 1 = female)');
readln(ans);
obwejitie := pol(ans);
writeln ('vvedite group');
readln(grupp);
end;
writeln ('vvod zakonchen');
writeln ;
count := 0;
for i:=1 to n do
if student[i].obwejitie = da then count := count + 1;
writeln(' obwejitie nyshno: ', count);
end.