Calculates BMI based on input.