vendredi 4 août 2017

Skipping an if statement if the previous thing is met

I have a couple IF statements and am trying to figure out how to have the first If statement execute something and not the second but if the first is not true then execute the second one.

if (condition)
{
    do_something;
}

if(condition_2)
{
    do_something_also;
}

I want the first if statement to happen but after it executes I want it to skip the second if statement. If the first do_something happens I want to skip the second if statement completely.

How do I go about doing this?

Aucun commentaire:

Enregistrer un commentaire