[BOJ 6825] Body Mass Index
View as PDF
Submit solution
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text
Points:
1
Time limit:
1.0s
Memory limit:
128M
Problem types
Allowed languages
The Body Mass Index (BMI) is one of the calculations used by doctors to assess an adult’s health. The doctor measures the patient’s height (in metres) and weight (in kilograms), then calculates the BMI using the formula
BMI = weight/(height × height).
Write a program which prompts for the patient’s height and weight, calculates the BMI, and displays the corresponding message from the table below.
| BMI Category | Message |
|---|---|
| More than 25 | Overweight |
| Between 18.5 and 25.0 (inclusive) | Normal weight |
| Less than 18.5 | Underweight |
입력 형식
출력 형식
예제 입력 1
69
1.73
예제 출력 1
Normal weight
예제 입력 2
84.5
1.8
예제 출력 2
Overweight
Comments