# BMI Calculator (Simple)

Page 1 of 1

## 0 Replies - 1251 Views - Last Post: 12 June 2011 - 11:35 AM

### #1 maniacalsounds

• D.I.C Regular

Reputation: 118
• Posts: 474
• Joined: 27-June 10

# BMI Calculator (Simple)

Posted 12 June 2011 - 11:35 AM

Description: To include, put this code somewhere in your webpage, normally between you and tags. Simply make a call to the function bmi() and pass the person's height (via the feet and inches parameters) and their pounds. This is more flexible than others, as it automatically converts feet and inches into pure inches. This will calculate the BMI of a person, easily.
```
function bmi(feet, inches, pounds) {
//feet = your height in feet, rounded down. (Like if you're five foot eight, just make feet 5)
//inches = your height in inches (INCHES ONLY. Don't include feet (LIke if you're five foot eight, put 8)
//pounds = your weight in pounds.
var dividend = pounds * 703;
var divisor = ((feet * 12) + inches) * ((feet * 12) + inches);
var bmi = dividend / divisor;
return bmi;
}

```

Is This A Good Question/Topic? 0

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }