Просмотр кода
Идентификатор: c39239ca Код загружен: 15 декабря 2010, 21:49 (Мережников Андрей)
function Наследник(а,в:name):boolean; var ft,mt:name; begin Result:=false; ft:=Отец(в); if ft=a then Result:=true else begin mt:=Мать(в); if mt=a then Result:=true else begin if ft<>'нет' then Result:=Наследник(а,ft); if not(Result) then if (mt<>'нет') then Result:=Наследник(а,mt); end; end; end;