My teacher has assigned a program to use both if-else statements and switch statements, so we understand how to implement both. The program asked u
A switch in C++ only allows you to check for the values of integers and chars.
The BMI is a double type, so it's not possible to check its value in a switch.
In your solution with the switch you also should declare the variable BMI as double. If you declare it as integer all decimal results will be casted to an integer, and you will lose the decimal places.