Advertisement
joaoantoniodornelas

Prática 1 - Questão 2 - 2014/2

Aug 28th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.83 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char const *argv[])
  5. {
  6.     float alturaBrutus = 1.84;
  7.     float alturaOlivia = 1.76;
  8.     float pesoBrutus = 122;
  9.     float pesoOlivia = 45;
  10.    
  11.     float IMCMax = 25;
  12.     float IMCMin = 18.5;
  13.    
  14.     float IMCBrutus = pesoBrutus/(alturaBrutus * alturaBrutus);
  15.     float IMCOlivia = pesoOlivia/(alturaOlivia * alturaOlivia);  
  16.    
  17.     float IMCIdealBrutus = (IMCMax - IMCBrutus) * alturaBrutus * alturaBrutus * -1;
  18.     float IMCIdealOlivia = (IMCMin - IMCOlivia) * alturaOlivia * alturaOlivia;  
  19.    
  20.  
  21.     printf("\nIMC de Brutus:%.2f\n\nIMC de Olivia: %.2f\n\n", IMCBrutus, IMCOlivia);
  22.  
  23.     printf("\nPerda necessaria para Brutus: %.2f Kg\n\nGanho necessario para Olivia: %.2f\n\n\n\n", IMCIdealBrutus, IMCIdealOlivia);
  24.    
  25.      
  26.     system ("PAUSE");
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement