Practice
BMI Calculator
MEDIUMSelection6 marks
Read a person's mass in kilograms and height in metres. Calculate their body mass index (BMI), then output the category.
- Below 18.5:
Underweight - 18.5 to below 25:
Normal - 25 to below 30:
Overweight - 30 or above:
Obese
Input: Mass followed by height. Output: The BMI category.
Example:
Input: 70
1.75
Output: Normal
Premium is coming soon. All grading features are currently unlocked.
Sample Test Cases
Test 1: Normal category
Inputs: 70, 1.75
Expected: Normal
Test 2: Underweight category
Inputs: 50, 1.8
Expected: Underweight