Var s:integer; p,mp,ms,s1,s2,min:real;
begin
write('s = ');
readln(s);
s1:=s*1.12;
writeln('s1 = ',s1);
min:=100;
p:=10;
while p<15 do<br> begin
p:=p+0.05;
s2:=(s+s*p/100/2)+(s+s*p/100/2)*p/100/2;
if abs(s1-s2) end;
writeln('mp = ',mp,'%');
writeln('s2 = ',ms:5:2);
end.
Пример:
s = 20000
s1 = 22400
mp = 11.65%
s2 = 22397.86