CJCoding With Joseph
15free / daySign inCreate account

Body Mass Category

Read a weight in kilograms and a height in metres, compute the body mass index as weight divided by height squared, and print it to one decimal in the form BMI: <value>. On a second line print the category: below 18.5 is Underweight, below 25 is Normal, below 30 is Overweight, and anything else is Obese. Input: two lines, the weight then the height, each a decimal number, no prompts. Output: two lines.

Expected Output:

BMI: 22.9
Normal

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

Hints4 available
Topics:
If Statements
📥 Auto-Input:
70\n1.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 · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.