================= sz m¡t¢g‚pek programoz sa ================ 1988. 01. 11. {------------------------------------------------------- 1/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; {------------------------------------------------------- 1/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 writeln('hello') else writeln('bello'); writeln; {------------------------------------------------------- 1/c} e1:=22; e2:=3; while not f(e1,e2) do s(e1,e2); writeln; {------------------------------------------------------- 1/d} ch1:=char(2); e2:=6; for e3:=ord(ch1) to pred(e2) do if e3 mod 2=0 then writeln(e3); writeln(succ(e2)); writeln; {------------------------------------------------------- 1/e} 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,' ',e2); writeln; {------------------------------------------------------- 1/f} 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; {------------------------------------------------------- 2. irjon egy fuggvenyt,amely, csucspontjainak x-y koordinataival (x1,x2,x3,y1,y2,y3) adott haromszogrol eldonti ,hogy egyenlo szaru-e ! --------------------------------------------------------- 3. irjon egy eljarast, amely egy 10x10 integer tipusu tombben megkeresi a legnagyobb osszegu sorban levo leg- nagyobb elemet. parameterkent adja at az elem: erteket, sor szamat, oszlop szamat. az eljaras nem hasznalhat globalis valtozikat ! ********************************************************** ***ez a minimum ez a minimum ez a minimum ez a minimum**** ********************************************************** 4. irjon teljes programot, amely egy text file geometriai kozepen levo karakterhez tartozo szot kinyomtatja. a file karaktereinek szamahoz az eoln karaktereket is figyelembe kell venni ! a szavakat space karakter valasztja el egymastol! ha a file kozepso eleme eppen space akkor azt kell kinyomtatni, ha eppen eoln akkor egy csillagot (*). pl: eb cica zsiraf lo tehen eof ^ ez a kozepe kiirja: zsiraf ---------------------------------------------------------- 5. irjon egy programot, amely kinyomtatja a pascal haromszoget a constansban megadott melysegig! pl. c=4 eseten: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 stb. ----------------------------------------------------------- 6. irjon egy eljarast, amely ket adott meretu matrix szorzasat vegzi el! az eljaras nem hasznalhat globalis valtozot!