Your code looks good (assuming this is a cut and paste of what you are actually compiling).
If the user enters any of the valid notes, the respective case clause should execute then break out of the switch. If none of the valid keys are pressed the default clause will execute.
Have you stepped through this in a debugger and verified that both clauses are actually executing? For what value of keys?
If the user enters any of the valid notes, the respective case clause should execute then break out of the switch. If none of the valid keys are pressed the default clause will execute.
Have you stepped through this in a debugger and verified that both clauses are actually executing? For what value of keys?