Prova ad aggiungere un
codice:
while(getchar()!='\n');
all'inizio di case 2, 3 e 4...