Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program skoky;
- {$APPTYPE CONSOLE}
- uses
- SysUtils;
- type rekord=0..1000;
- var i,n:byte;
- sk,min,max:rekord;
- begin
- { TODO -oUser -cConsole Main : Insert code here }
- write('Zadajte pocet skokanov: ');
- readln(n);
- max:=0;
- min:=1000;
- writeln;
- for i:=1 to n do
- begin
- write('Zadajte dlzku ',i,' skoku(v cm): ');
- readln(sk);
- if sk>max then max:=sk;
- if sk<min then min:=sk;
- end;
- writeln;
- writeln('Najdlhsi skok bol: ',max,' cm');
- writeln('Najkratsi skok bol: ',min,' cm');
- readln
- end.
Advertisement
Add Comment
Please, Sign In to add comment