Comincia ad inserire una linea

while(getchar()!='\n');

dopo la scanf per svuotare il buffer