#P5714. BMI Index Classification
BMI Index Classification
BMI Index Classification
The Body Mass Index (BMI) is an internationally recognized standard to evaluate body fat. The formula is given by (\dfrac{m}{h^2}), where (m) is the weight in kilograms and (h) is the height in meters.
Based on the BMI value, the classifications are as follows:
- If BMI (< 18.5): output “Underweight”
- If BMI (\geq 18.5) and BMI (< 24): output “Normal”
- If BMI (\geq 24): for C++ output the BMI value using default precision, then a newline and “Overweight”; for other languages, output the BMI value rounded to six significant digits (rounded half-up, with any trailing zeros in the decimal part removed), then a newline and “Overweight”.
inputFormat
Two space-separated numbers: the weight in kilograms and the height in meters.
outputFormat
Output one of the following based on the computed BMI value:
- If BMI (< 18.5), output: Underweight
- If BMI (\geq 18.5) and BMI (< 24), output: Normal
- If BMI (\geq 24), output the BMI value on the first line (formatted as specified) followed by “Overweight” on the next line.
sample
50 1.80
Underweight