Skip to the task
Layout
Back to classic view

You are looking at lesson 3. Your place is still lesson 9, task 1: Strings.

CHECKTask 16 of 22 · step 7: Drills: check yourself

Why two lines?

When you type 10, the program prints two lines. Why?

switch (grade) {
case 10:
    printf("Excellent\n");
case 9:
    printf("Very good\n");
    break;
}
Stuck?

There is no break after case 10, so execution "falls through" into case 9. The course flags wouldn't compile it: this statement may fall through.