Body Mass Index
Time limit1sMemory limit128 MB
Read a weight and a height, compute weight divided by height squared, and print the BMI category.
- Level
Easy2 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
The Body Mass Index (BMI) is one of the measurements a doctor uses to assess an adult's health. The doctor measures the patient's weight (in kilograms) and height (in metres), then computes the BMI with the formula
Given the patient's weight and height, calculate the BMI and print the message that matches the table below.
Input
The first line contains the weight in kilograms. The second line contains the height in metres. Both values are positive real numbers.
Output
Print exactly one line: the message that corresponds to the computed BMI — Overweight, Normal weight, or Underweight.