C++ multiple conditions for if statement

2020-05-10 12:03发布

问题:

Anyone know why this wont work. How am I supposed to put in multiple conditions to be met.

    else if (studentoverall < 90; studentoverall>=80)
    {
        lettergrade = "B";
    }

回答1:

With Logical AND (&&):

else if (studentoverall < 90 && studentoverall >= 80)