Abych jenom nekritizoval, tak jsem tu lempourovu verzi upravil do funkční podoby. Seš teda fakt ale ostuda, tohle by si měl umět po půl roce sám.
Kód:program Obsahy; Procedure Kruh; var pol: real; begin; writeln ('Zadej polomer kruhu: '); readln(pol); writeln('Obsah: ',Pi*sqr(pol):0:3); writeln('Obvod: ',2*Pi*pol:0:3); writeln; end; Procedure Obdelnik; var a,b: real; begin; writeln('Zadej strany (a) a (b): '); readln(a,b); writeln('Obsah: ',a*b:0:3); writeln('Obvod: ',2*(a+b):0:3); writeln; end; var volba: byte; begin repeat writeln('Jaky utvar chces pocitat?'); writeln('0: konec'); writeln('1: kruh'); writeln('2: obdelnik'); readln(volba); case volba of 1: Kruh; 2: Obdelnik; end; until volba=0; end.




Odpověď s citací