Body Mass Index | 프로그래밍의 벗 PivotOJ
PivotOJ

Body Mass Index

시간 제한: 1000ms메모리 제한: 128MB출처: CCC 2008 JuniorBOJ 6825

문제

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
출력
Normal weight

예제 2

입력
84.5
1.8
출력
Overweight
코드를 제출하려면 로그인하세요.