index.js 684 B

1234567891011121314151617181920212223
  1. var a =Number(prompt( '1(woman) or 2(man)'));
  2. var v =Number(prompt( 'your weight')) ;
  3. var r =Number(prompt( 'your height'));
  4. var l = Number(prompt( 'your age'));
  5. var passive = Number(prompt('passive lifestyle; yes-1 ,no-2 ' ));
  6. var tren = Number(prompt('workouts three times a week; yes-1, no-2 '));
  7. var fef = Number(prompt('workouts five times a week; yes-1, no-2 '));
  8. var int = Number(prompt('daily works; yes-1; no-2'));
  9. var k=0;
  10. if(passive==1){
  11. k=1.2
  12. } else if( tren ==1){
  13. k=1.375
  14. } else if( fef==1){
  15. k=1.5
  16. } else if(int==1){
  17. k=1.6375
  18. };
  19. if (a==1){
  20. alert((655.1+(9.563*v)+(1.85*r)-(4.676*l))*k )
  21. } else if(a==2){
  22. alert((66.5+(13.75*v)+(5.003*r)-(6.775*l))*k)
  23. };