← Back to User Input
Question 186
Body Mass Index
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
Sign in to use hintsTopics:
User Input
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.