Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program zberpapiera;
- {$APPTYPE CONSOLE}
- uses SysUtils;
- type zostatok=0..1000;
- max=0..1500;
- var p,s:max;
- z:zostatok;
- begin
- { TODO -oUser -cConsole Main : Insert code here }
- z:=1000; s:=0;
- repeat
- write('Kolko kg papiera mate?: ');
- readln(p);
- z:=z-p;
- s:=s+p;
- writeln('Musite este odovzdat ',z,' kg papiera');
- until s>=1000;
- if s>1000 then writeln('Odovdzali ste o ',1000-s,' kg viac papiera!');
- if s=1000 then writeln('Odovdzali ste presne 1000 kg papiera!');
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment