E poi devi pulire il buffer di input della tastiera subito dopo ogni scanf.