CJCoding With Joseph
15free / daySign inCreate account

BMI Category

Two variables are given: weight in kilograms and height in metres. Compute the body mass index as weight divided by height squared and store it in a constant called bmi. Then print the category with an if / else if / else chain: Underweight below 18.5, Normal from 18.5 up to but not including 25, Overweight from 25 up to but not including 30, and Obese at 30 or more.

Expected Output:

Normal

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
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 (clog, fn, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.