โ Back to If Statements
Question 273
BMI Category
BMI Category
Read a weight in kilograms and a height in meters, both as decimals, usingscanf("%f %f", ...). Compute the BMI asweight / (height * height)and print its category with no trailing newline: BMI below18.5printsUnderweight. BMI below25printsNormal. BMI below30printsOverweight. Otherwise printsObese. For input50 1.75the output isUnderweight; for70 1.75it isNormal; for100 1.75it isObese.
Expected Output:
Underweight
Topics:
If Statements
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (p, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.