BMI Category
mediumQuestion 242Two 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, so print one after the last line.
Hints3 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 (clog, fn, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.