Skip to content

Instantly share code, notes, and snippets.

@scottswaaley
Created August 3, 2016 17:00
Show Gist options
  • Save scottswaaley/603592aca15a76b6842df1ba5bb745ed to your computer and use it in GitHub Desktop.
Save scottswaaley/603592aca15a76b6842df1ba5bb745ed to your computer and use it in GitHub Desktop.
int age = /* some user input*/;
if( condition_1 ) {
// if condition_1 is true, then do some stuff here and skip all the else clauses
} else if( condition_2 ) {
// if condition_1 is false but condition_2 is true, then do some stuff here then skip the last else clause
} else {
// if condition_1 and condition_2 are false, then do stuff here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment