diceman76
New member
- Joined
- Feb 9, 2020
- Messages
- 3
- Programming Experience
- Beginner
Body Mass Index (from week 2)
BMI is often used to determine whether a person is overweight or underweight for their height. A person’s BMI is calculated with the formula - BMI = Weight * 703 / Height^2. Weight is entered in pounds, Height is entered in inches. A person is underweight if their BMI is less than 18.5, optimal if BMI is between 18.5 and 25, and overweight if BMI is greater than 25.
Implement the above in C# as:
double bmi = weight * 703d / (height * height);
Use a module named "Bmi" that accepts two parameters (weight, height) to calculate and display the BMI and if the person is underweight, optimal, or overweight.
Implement your program in C# using repl.it.
Test cases for your C# code:
Submit pseudocode in a pdf file named Week3_Body_Mass_Index.pdf.
- weight = 90, height = 61 - correct answer BMI = 17.0, under weight
- weight = 165, height = 70 - correct answer BMI = 23.7, optimal
- weight = 230, height = 72 - correct answer BMI = 31.2, over weight
any help would be appreciated as this is all new to me,thanks in advance.