Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program lab2;
- {$APPTYPE CONSOLE}
- {$R *.res}
- uses
- System.SysUtils;
- var
- Weight, Price, TotalPrice: Integer;
- begin
- Writeln('Таблица цены сыра:' + #13#10 + ' ________________' + #13#10 +
- '|цена |стоимость|' + #13#10 + '|______|_________|');
- Weight := 50;
- Price := 280;
- repeat
- TotalPrice := Weight * Price div 1000;
- Write ('|', Weight, 'г');
- if Weight < 100 then
- Writeln(' |', TotalPrice, 'р |')
- else
- if Weight < 400 then
- Writeln(' |', TotalPrice, 'р |')
- else
- if Weight < 1000 then
- Writeln(' |', TotalPrice, 'р |')
- else
- Writeln(' |', TotalPrice, 'р |');
- Writeln('|______|_________|');
- Weight := Weight + 50;
- until Weight > 1000;
- Readln;
- end.
Add Comment
Please, Sign In to add comment