CJCoding With Joseph

Compute BMI

Write a function double bmi(double weight, double height) that returns the Body Mass Index using weight / (height * height). Call it with bmi(70, 1.75) and print the result with exactly 2 decimal places:

22.86

Expected Output:

22.86
Topics:
Functions
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.