Advertisement
henriqueforino

LISTA2_EX010 2014/02

Sep 30th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.64 KB | None | 0 0
  1. //ALUNO: Luiz Henrique Forino
  2. //PROGRAMAÇÃO I, PROFESSOR PX
  3. //2014/02
  4.  
  5. Program EX07_LISTA02 ;
  6.  
  7. var y, z, imchomem, imcmulher :real;  //y para altura,
  8. var x :integer; //x para o sexo
  9.  
  10. Begin
  11.   writeln ('Digite 1 para HOMEM ou 2 para MULHER: ');
  12.   readln (x);
  13.   writeln ('Digite a sua altura: ');
  14.   readln (y);
  15.  
  16.   if (x = 1) then
  17.   begin
  18.     imchomem := ((72.7*y)-58);
  19.     writeln ('IMC HOMEM: ', imchomem, '.');
  20.   end;
  21.   if (x = 2) then
  22.   begin
  23.     imcmulher := ((62.1*y)-44.7);
  24.     writeln ('IMC MULHER: ', imcmulher, '.');
  25.   end;
  26.   if (x <> 1) and (x <> 2) then
  27.   writeln ('Sexo não identificado');
  28.   readkey
  29.  
  30. End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement