CJCoding With Joseph
15free / daySign inCreate account

Body Mass Index

Read a weight in kilograms and then a height in metres, both decimal numbers, and print the body mass index, the weight divided by the height squared, with one decimal in the form BMI: <value> using :0.1f. Input: two lines, the weight then the height, no prompts.

Expected Output:

BMI: 22.9

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

Hints3 available
Topics:
User Input
📥 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.