BMI Category
hardQuestion 343Read a weight in kilograms and a height in meters, both as decimals, using scanf("%f %f", ...). Compute the BMI as weight / (height * height) and print its category with no trailing newline:
BMI below 18.5 prints Underweight.
BMI below 25 prints Normal.
BMI below 30 prints Overweight.
Otherwise prints Obese.
For input 50 1.75 the output is Underweight; for 70 1.75 it is Normal; for 100 1.75 it is Obese.
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.