CJCoding With Joseph
15free / daySign inCreate account

Body Mass Index Report

Read a name, a weight in kilograms (a decimal number) and a height in centimetres (a decimal number), one per line with no prompts. Convert the height to metres by dividing by 100, compute the body mass index as the weight divided by the height in metres squared, and print two lines: <name>: <weight> kg, <height in metres> m with the weight to one decimal and the height to two, then BMI: <value> with one decimal, using :0.1f and :0.2f. Input: three lines in that order.

Expected Output:

Ana: 70.0 kg, 1.75 m
BMI: 22.9

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

Hints4 available
Topics:
User Input
📥 Auto-Input:
Ana\n70\n175\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.