Hello world, I'm talking about using nested if/else in C#. I have the body mass index program that I wrote earlier. But usually when you're told your BMI. The doctor will say something like you're underweight or overweight or obese or something like that. So I'm going to use a nested if else to show that risk factor every time. the scrollbars change, either one of them changes. I have added a label lblRisk. lblRisk. And when I calculate the BMI. After calculating that, I'm going to show the risk. This is what they say in human terms. And I'm going to use a nested if else, And. Show you how we would do that. in C#. I'm going to declare a string. risk. And give an initial value of. a null string: "". And then I'm going to go through this. And. The first one underweight if BMI is less than 18.5. So I'm going to say if. BMI is less than 18.5. Risk equals underweight. Okay, this doesn't know bmi. Because, It's declared inside this if block, so what I'm going to have to do Declare bmi outside that If block, Let's just give it an initial value of 0. And then I don't declare it here. I give it a value. Takes care of this. The next line says that normal weight is a BMI. Between 18.5. and 24.9. If it was less than 18.5, I took care of that here. So here I'm going to say else... And I don't have to say That it's at least that, I can just say else if(. BMI. is less than. 24. Less than 25. Becasue here it says between 25. So here I'm going to say less than 25. Risk equals. Normal Weight Be consistent with capitalization. OK. So... I've already checked For this, this, and this. So I'm going to have another else if. And here I want less than 30. If BMI is less than 30. Risk equals. Overweight. Anything else. I can say "Obese" So I don't have to check. Each of these values, I can. Filter it out so if this is not true, I can go to this and say okay, if their BMI is less than 25, they're normal weight, because underweight is already taken care of. And then the last step, is to just say lblRisk Text. Equals. Whatever I have set risk to and it's a little easier to assign it at the end because we may decide we want something for risk factor to be a function that returns a string and if we wanted to change that it's easier to change that that way. So let's run this and just see how we're doing here. Five foot nine. And you can see As we go up. And now we have a normal weight. BMI f 23. Go up a few more pounds. Overweight. And so on. And you could test that thoroughly and make sure all of that works. But basically, Here it is in English, And here it is, the same calculation done in C#. And that's it for now.