You chain else if to test multiple conditions in sequence. I'll show you: if (cond1) { } else if (cond2) { } else { } tests conditions until one is true. Each condition is tested only if all previous conditions were false.
The first true condition runs its block, then the entire chain ends. Here's an example: if (grade >= 90) { cout << "A"; } else if (grade >= 80) { cout << "B"; } else { cout << "F"; } assigns letter grades.