all new to me

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:

  • 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
Submit pseudocode in a pdf file named Week3_Body_Mass_Index.pdf.

any help would be appreciated as this is all new to me,thanks in advance.
 
This is clearly for a class, as you're being asked to submit something, so it's not for us to do your homework for you. You're being asked to submit psuedocode, so it's barely even a programming problem. The first thing you should do is forget that it's a programming problem at all. Pretend that you're being asked to do it all manually. Pick up a pen and paper and do it. Once you've actually done it manually, pretend that your task is to provide a series of steps that someone else can follow to do it manually. Assume the person is a complete moron and make each step as simple as possible and the the whole series as detailed as possible. Once you have done that, follow the steps yourself for various input data and confirm that you get the expected output. When that's working you have yourself an algorithm. You can then write psuedocode based on that algorithm, just as you have already been taught to do in your class. If you have any specific concerns about your algorithm, you can show us what you have done and explain those concerns. If you are having any specific issues in writing the psuedocode from the algorithm, again, show us what you've done and explain the issue. If you have no idea at all how to proceed then you need to go back over the notes/text you have from your class and actually learn what you've been taught.
 
Back
Top Bottom