The default case runs when no other case matches. I'll show you: default: cout << "Invalid"; handles any value you didn't list in other cases. You put default last after all case statements.
It works like the final else in an if-else chain, catching everything that didn't match earlier. Always include default to handle unexpected input. Without it, the switch does nothing when no case matches, which can hide bugs or make your program ignore invalid data.