The Body-Mass Index of a person is a value derived from their weight and height. More specifically, it may be computed using the formula:
$$\frac{m}{h^2}$$
where \(m\) is the mass in kilograms, and \(h\) is the height in meters of the person.
Your Program
Write a program which:
- Asks the user for their weight in pounds. Store this as a variable, and make sure to convert to an integer. You may assume that the user will only enter a positive, whole-valued number of pounds.
- Asks the user for their height in inches. You will want to store this as another variable. Again, you way assume that the user will only enter a positive, whole-valued number of inches.
- Converts their weight from pounds to kilograms by multiplying by \(0.454\).
- Converts their height from inches to meters by multiplying by \(0.0254\).
- Calculates the user's BMI.
- Prints the BMI calculation to the console.
When you are done, try calculating a BMI and compare to an online calculator. Was the BMI calculated correctly? Ask for help if you need!