IF statements

Sep 7, 2019 at 12:56am
Hello all, I am working on a code for class and I wanted to do something different. I want to include a range for a BMI calculator without using && or ||. what options would I have?

IE:

if(bmi >= 20 && bmi <=25)
Sep 7, 2019 at 1:34am
You could start with the biggest number then go to a smaller number.
Ex.)
1
2
3
if (bmi >= 25)
else if (bmi >= 20)
else if (bmi >= 15)
Topic archived. No new replies allowed.