Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const markKg = 75;
  2. const johnKg = 89;
  3. const markAlt = 1.70;
  4. const johnAlt = 1.90;
  5.  
  6. const imc = markKg / (markAlt^2);
  7. const imc1 = johnKg / (johnAlt^2);
  8. const resultado = imc - imc1;
  9.  
  10. console.log(`A massa de Mark e John tem a diferença de: ${resultado.toPrecision(3)}`);
  11. console.log(`IMC de Mark: ${imc.toPrecision(4)}`);
  12. console.log(`IMC de John: ${imc1.toPrecision(4)}`);
  13.  
  14. const diferença = imc > imc1;
  15.  
  16. console.log(`O IMC de Mark é maior que o de John? ${diferença}`);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement