I am in my first C++ programming classes, and I was wondering what the difference between a Switch with cases is and if..else statement.
For example the programming we are doing has to do with mileage and reinbursment. Can I do calculations for milage and money in a switch statement, or is it better to do it in an if..else statement.
i was thinking along the lines of
If (j=>2001)
{
.12*2000+175
else if (j>3000)
{
.10*3200+190
... Until the end.
For example the programming we are doing has to do with mileage and reinbursment. Can I do calculations for milage and money in a switch statement, or is it better to do it in an if..else statement.
i was thinking along the lines of
If (j=>2001)
{
.12*2000+175
else if (j>3000)
{
.10*3200+190
... Until the end.