var
m,w,rost,ves:real;
p,pop,sbr:string;
begin
Writeln('Введите ваш пол.');
Readln(p);
Writeln('Введите ваш рост (см).');
Readln(rost);
Writeln('Введите ваш вес (кг)');
Readln(ves);
pop:='поправиться на';
sbr:='похудеть на';
m:=(rost-100)*1.15;
w:=(rost-110)*1.15;
begin
if (p='Женский') or (p='женский') then writeln('Ваш идеальный вес:',' ',w,' ','кг');
if (p='Мужской') or (p='мужской') then writeln('Ваш идеальный вес:',' ',m,' ','кг');
begin
if (p='Женский') or (p='женский') and (w>ves) then writeln('Вам нужно',' ',pop,' ',w-ves,' ','кг');
if (p='Женский') or (p='женский') and (w<ves) then writeln('Вам нужно',' ',sbr,' ',ves-w,' ','кг');
if (p='Мужской') or (p='мужской') and (m>ves) then writeln('Вам нужно',' ',pop,' ',m-ves,' ','кг');
if (p='Мужской') or (p='мужской') and (m<ves) then writeln('Вам нужно',' ',sbr,' ',ves-m,' ','кг')
end;
if (w=ves) or (m=ves) then writeln('У вас идеальный вес.');
end;
readln
end.
