= = = = = = = = = programoz s alapjai = = = = = = = = = vizsga 1992. janu r 22. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1. feladat 5*0.2 pont meg kell  llap¡tani, hogy az al bbi programr‚szek hat s ra mi fog ki¡r¢dni. jelezze a sz¢k”z”ket, ‚s az is fontos, hogy mi kerl £j sorba. a r‚szletek egy olyan programban helyezkednek el, amelynek a deklar ci¢s r‚sze a k”vetkez“: < v-def.pas > a) new(m1); m1^.lanc:=nil; m1^.kulcs:=5; for e1:=1 to 5 do begin m2:=m1; new(m3); m3^:=m2^; m2^.kulcs:=e1; m2^.lanc:=m3; end; m3^.lanc:=m1^.lanc; for e1:=1 to 6 do begin write(m1^.kulcs:3); m1:=m1^.lanc; end; writeln; ------------------------------------------------------- b) h1:=[ord(alberlet)..pred(ord(kastely))]; h2:=[11..30]; h3:=h2+h1; for e1:=1 to 11 do if e1 in h3 then if e1 in h1 then write('a') else write('b'); writeln; ------------------------------------------------------- c) e1:=22; e2:=3; while not f(e1,e2) do s(e1,e2); writeln; ------------------------------------------------------- d) with rect[1] do begin nev:='01'; suly:=2; end; with rect[2] do begin nev:='03'; suly:=4; end; with rect[3] do begin nev:='05'; suly:=6; end; for e1:=1 to 2 do for e2:=1 to 2 do if ord(rect[e2].suly) >= ord(rect[e1].suly) then writeln(e1:4,' ',e2:4); writeln; ------------------------------------------------------- e) e1:=3; e2:=0; b1:=e1<=e2; t2[1,1]:=b1; t2[1,2]:=t2[1,1] or (e1 mod 2=1); t2[2,1]:=t2[1,1] and t2[1,2]; t2[2,2]:=not t2[2,1] or t2[1,2]; for e1:=2 downto 1 do for e2:=1 to 2 do write(t2[e1,e2]:8); writeln; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -