Check the return value of scanf()