← Back to If Statements
Question 343
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= newline. No newline after the last line.
Hints4 available
Sign in to use hintsTopics:
If Statements
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · 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.