int main()
{
bool condition1;
bool condition2;
if (condition1)
{
// The program does this if condition1 is true.
}
else if (condition2)
{
// The program does this if condition1 is false and condition2 is true.
}
else
{
// The program does this if neither condition1 nor condition2 is true.
}
int case;
switch (case)
{
case 0:
// The program does this if case is equal to 0;
break; // This breaks out of the statement.
// If this wasn't here, it would continue through all the remaining cases.
case 1:
// The program does this if case is equal to 1;
break;
case 2:
// The program does this if case is equal to 2;
break;
default:
// The program does this if case is equal to none of the cases;
}
return 0;
}