• Matéria: Inglês
  • Autor: JuliaCardoso0102
  • Perguntado 9 anos atrás

Someone Help me Please i need this :
With the entry height and sex of a person , build an algorithm to calculate and print your ideal weight, using the following formulas : - For men : ( 72.7 * H) -58 - For women : ( 62.1 * H) -44.7

Respostas

respondido por: lucassbombana
2
Yes bro,i will help you with that.


Program ex_08;
char;h,pm,pf:real;
Begin
Writeln('Write your height');
read(h);
Writeln('Write your gender (M or F)'); 
read(s); 
if s = 'M' then
begin
pm:=(72.7 * h)-58;
write('Your ideal weight is ' , pm :2:2 ,  ' KG ');end
else
begin
pf:=(62.1*h)-44.7;
write(' Your ideal weight is' , pf :2:2 , ' KG ' ); end
End.

JuliaCardoso0102: What is thin in "WRITE"? i don't understand
JuliaCardoso0102: this*
JuliaCardoso0102: ooh, thx, now i understand :D
Perguntas similares