Reference no: EM132356792
Question :
A health insurance company wants a program to promote health and fitness. This program can do two things: calculate BMI (Body Mass Index) and determine whether a person has high blood pressure. To calculate BMI, the user must enter his height (in inches) and weight (in pounds).
Us the following formula to calculate BMI:
BMI = (703 * weight) / (height*height)
To determine whether a person has high blood pressure, the user must enter his systolic pressure and diastolic pressure. If the systolic pressure >= 140 or the diastolic pressure is >= 90, he has high blood pressure.
Define and use the following two functions in this program:
calc_bmi: Get height and weight from the user. Calculate and display BMI.
hypertension: Get systolic pressure and diastolic pressure from the user. Determine and display whether the user has high blood pressure.
Also write and use a main function to implement the mainline logic of the program. The user chooses to calculate BMI only, to determine high blood pressure only, or both. The following is an example.