CJCoding With Joseph
15free / daySign inCreate account

BMI Category

Read 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
Topics:
If Statements
📥 Auto-Input:
50 1.75\n
This input is automatically fed to your program's stdin
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.