Search:
Forum
Beginners
IF statements
IF statements
Sep 7, 2019 at 12:56am UTC
CodeNovice01
(278)
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 UTC
rjphares
(136)
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.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs